#
6e1f1916 |
| 08-Dec-2023 |
Zixu Wang <9819235+zixu-w@users.noreply.github.com> |
[clang][PP] Add extension to predefine target OS macros (#74676)
Add an extension feature `define-target-os-macros` that enables clang to
provide definitions of common TARGET_OS_* conditional macro
[clang][PP] Add extension to predefine target OS macros (#74676)
Add an extension feature `define-target-os-macros` that enables clang to
provide definitions of common TARGET_OS_* conditional macros. The
extension is enabled in the Darwin toolchain driver.
show more ...
|
#
5ad3a32c |
| 05-Dec-2023 |
Juergen Ributzka <juergen@ributzka.de> |
[clang][modules] Reset codegen options (take 2). (#74388)
CodeGen options do not affect the AST, so they usually can be ignored.
The only exception to the rule is when a PCM is created with
`-gmod
[clang][modules] Reset codegen options (take 2). (#74388)
CodeGen options do not affect the AST, so they usually can be ignored.
The only exception to the rule is when a PCM is created with
`-gmodules`.
In that case the Clang module format is switched to object file
container and contains also serialized debug information that can be
affected by debug options. There the following approach was choosen:
1.) Split out all the debug options into a separate `DebugOptions.def`
file. The file is included by `CodeGenOptions.def`, so the change is
transparent to all existing users of `CodeGenOptions.def`.
2.) Reset all CodeGen options, but excluding affecting debug options.
3.) Conditionally reset debug options that can affect the PCM.
This fixes rdar://113135909.
show more ...
|
#
1157bee5 |
| 04-Dec-2023 |
Juergen Ributzka <juergen@ributzka.de> |
Revert "[clang][modules] Reset codegen options. (#74006)"
This reverts commit fef1854318bd797c1f8a141d4b45b113b04860d1.
|
#
fef18543 |
| 04-Dec-2023 |
Juergen Ributzka <juergen@ributzka.de> |
[clang][modules] Reset codegen options. (#74006)
CodeGen options do not affect the AST, so they usually can be ignored.
The only exception to the rule is when a PCM is created with
`-gmodules`.
I
[clang][modules] Reset codegen options. (#74006)
CodeGen options do not affect the AST, so they usually can be ignored.
The only exception to the rule is when a PCM is created with
`-gmodules`.
In that case the Clang module format is switched to object file
container and contains also serialized debug information that can be
affected by debug options. There the following approach was choosen:
1.) Split out all the debug options into a separate `DebugOptions.def`
file. The file is included by `CodeGenOptions.def`, so the change is
transparent to all existing users of `CodeGenOptions.def`.
2.) Reset all CodeGen options, but excluding affecting debug options.
3.) Conditionally reset debug options that can affect the PCM.
This fixes rdar://113135909.
show more ...
|
#
e3a97dff |
| 04-Dec-2023 |
Momchil Velikov <momchil.velikov@arm.com> |
[Verifier] Check function attributes related to branch protection (NFC) (#70565)
|
#
cfe1ece8 |
| 01-Dec-2023 |
Paul Kirth <paulkirth@google.com> |
[clang][llvm][fatlto] Avoid cloning modules in FatLTO (#72180)
https://github.com/llvm/llvm-project/issues/70703 pointed out that
cloning LLVM modules could lead to miscompiles when using FatLTO.
[clang][llvm][fatlto] Avoid cloning modules in FatLTO (#72180)
https://github.com/llvm/llvm-project/issues/70703 pointed out that
cloning LLVM modules could lead to miscompiles when using FatLTO.
This is due to an existing issue when cloning modules with labels (see
#55991 and #47769). Since this can lead to miscompilation, we can avoid
cloning the LLVM modules, which was desirable anyway.
This patch modifies the EmbedBitcodePass to no longer clone the module
or run an input pipeline over it. Further, it make FatLTO always perform
UnifiedLTO, so we can still defer the Thin/Full LTO decision to
link-time. Lastly, it removes dead/obsolete code related to now defunct
options that do not work with the EmbedBitcodePass implementation any
longer.
show more ...
|
Revision tags: llvmorg-17.0.6 |
|
#
e2d60c86 |
| 28-Nov-2023 |
Fangrui Song <i@maskray.me> |
[Frontend] Remove unneeded -frtti check. NFC
-frtti is not a CC1 option. We just need to check -fno-rtti.
|
#
07d799f0 |
| 23-Nov-2023 |
Egor Zhdan <e_zhdan@apple.com> |
[APINotes] Upstream Driver and Frontend options that enable API Notes
This upstreams more of the Clang API Notes functionality that is
currently implemented in the Apple fork:
https://github.com/a
[APINotes] Upstream Driver and Frontend options that enable API Notes
This upstreams more of the Clang API Notes functionality that is
currently implemented in the Apple fork:
https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes
show more ...
|
#
ff219ea9 |
| 17-Nov-2023 |
Erich Keane <ekeane@nvidia.com> |
[OpenACC] Initial commits to support OpenACC (#70234)
Initial commits to support OpenACC. This patchset:
adds a clang-command line argument '-fopenacc', and starts
to define _OPENACC, albeit t
[OpenACC] Initial commits to support OpenACC (#70234)
Initial commits to support OpenACC. This patchset:
adds a clang-command line argument '-fopenacc', and starts
to define _OPENACC, albeit to '1' instead of the standardized
value (since we don't properly implement OpenACC yet).
The OpenACC spec defines `_OPENACC` to be equal to the latest standard
implemented. However, since we're not done implementing any standard,
we've defined this by default to be `1`. As it is useful to run our
compiler against existing OpenACC workloads, we're providing a
temporary override flag to change the `_OPENACC` value to be any
entirely digit value, permitting testing against any existing OpenACC
project.
Exactly like the OpenMP parser, the OpenACC pragma parser needs to
consume and reprocess the tokens. This patch sets up the infrastructure
to do so by refactoring the OpenMP version of this into a more general
version that works for OpenACC as well.
Additionally, this adds a few diagnostics and token kinds to get us
started.
show more ...
|
Revision tags: llvmorg-17.0.5 |
|
#
651c502f |
| 12-Nov-2023 |
Kazu Hirata <kazu@google.com> |
[clang] Stop including llvm/ADT/DenseSet.h (NFC)
Identified with clangd.
|
#
f1c9a1c3 |
| 02-Nov-2023 |
Egor Zhdan <e_zhdan@apple.com> |
Revert "Revert "[APINotes] Upstream APINotesOptions""
This re-lands https://github.com/llvm/llvm-project/pull/70827 while
preventing the assertion failure that occurred when generating
`ASTNodeAPI
Revert "Revert "[APINotes] Upstream APINotesOptions""
This re-lands https://github.com/llvm/llvm-project/pull/70827 while
preventing the assertion failure that occurred when generating
`ASTNodeAPI.json` on non-Apple platforms.
show more ...
|
#
0e06ddf0 |
| 01-Nov-2023 |
Johannes Doerfert <johannes@jdoerfert.de> |
Revert "[APINotes] Upstream APINotesOptions"
This reverts commit c0a1857928c557400af0ed53d198cc9f3f185f9a.
A shared_ptr assertion always triggers causes all bots to fail.
|
#
c0a18579 |
| 01-Nov-2023 |
Egor Zhdan <e_zhdan@apple.com> |
[APINotes] Upstream APINotesOptions
This upstreams more of the Clang API Notes functionality that is
currently implemented in the Apple fork:
https://github.com/apple/llvm-project/tree/next/clang/
[APINotes] Upstream APINotesOptions
This upstreams more of the Clang API Notes functionality that is
currently implemented in the Apple fork:
https://github.com/apple/llvm-project/tree/next/clang/lib/APINotes
This adds the first compiler options related to API Notes to the
upstream Clang: `-iapinotes-modules` and `-fapinotes-swift-version=`.
However, this does not add the `-fapinotes` flag that enables API Notes,
since the feature is not fully functional yet.
show more ...
|
Revision tags: llvmorg-17.0.4 |
|
#
e9a7876c |
| 27-Oct-2023 |
Chuanqi Xu <yedeng.yd@linux.alibaba.com> |
[C++20] [Modules] Chose BMI from for module m with the last -fmodule-file=<module-name>= option
Currently if we have multiple `-fmodule-file=<module-name>=<BMI-path>` flags for the same `<module-nam
[C++20] [Modules] Chose BMI from for module m with the last -fmodule-file=<module-name>= option
Currently if we have multiple `-fmodule-file=<module-name>=<BMI-path>` flags for the same `<module-name>`, we will pick the BMI-path from the first flag. And this is inconsistent with what users generally expect. e.g, we might expect the latter flags can override the former ones.
This patch changes the behavior to match user's expectation.
show more ...
|
Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4 |
|
#
fd4f9629 |
| 23-Aug-2023 |
Min-Yih Hsu <minyihh@uci.edu> |
[Clang][M68k] Add Clang support for the new M68k_RTD CC
This patch adds `CC_M68kRTD`, which will be used on function if either `__attribute__((m68k_rtd))` is presented or `-mrtd` flag is given.
Dif
[Clang][M68k] Add Clang support for the new M68k_RTD CC
This patch adds `CC_M68kRTD`, which will be used on function if either `__attribute__((m68k_rtd))` is presented or `-mrtd` flag is given.
Differential Revision: https://reviews.llvm.org/D149867
show more ...
|
#
d7b18d50 |
| 09-Oct-2023 |
Kazu Hirata <kazu@google.com> |
Use llvm::endianness{,::little,::native} (NFC)
Now that llvm::support::endianness has been renamed to llvm::endianness, we can use the shorter form. This patch replaces llvm::support::endianness wi
Use llvm::endianness{,::little,::native} (NFC)
Now that llvm::support::endianness has been renamed to llvm::endianness, we can use the shorter form. This patch replaces llvm::support::endianness with llvm::endianness.
show more ...
|
#
a42787d1 |
| 26-Sep-2023 |
Arthur Eubanks <aeubanks@google.com> |
[clang] Add -mlarge-data-threshold for x86_64 medium code model (#66839)
Error if not used with x86_64.
Warn if not used with the medium code model (can update if other code
models end up using th
[clang] Add -mlarge-data-threshold for x86_64 medium code model (#66839)
Error if not used with x86_64.
Warn if not used with the medium code model (can update if other code
models end up using this).
Set TargetMachine option and add module flag.
show more ...
|
#
4b163e34 |
| 13-Sep-2023 |
Richard Smith <richard@metafoo.co.uk> |
Implement mangling rules for C++20 concepts and requires-expressions.
This implements proposals from:
- https://github.com/itanium-cxx-abi/cxx-abi/issues/24: mangling for constraints, requires-cl
Implement mangling rules for C++20 concepts and requires-expressions.
This implements proposals from:
- https://github.com/itanium-cxx-abi/cxx-abi/issues/24: mangling for constraints, requires-clauses, requires-expressions. - https://github.com/itanium-cxx-abi/cxx-abi/issues/31: requires-clauses and template parameters in a lambda expression are mangled into the <lambda-sig>. - https://github.com/itanium-cxx-abi/cxx-abi/issues/47 (STEP 3): mangling for template argument is prefixed by mangling of template parameter declaration if it's not "obvious", for example because the template parameter is constrained (we already implemented STEP 1 and STEP 2).
This changes the manglings for a few cases:
- Functions and function templates with constraints. - Function templates with template parameters with deduced types: `typename<auto N> void f();` - Function templates with template template parameters where the argument has a different template-head: `template<template<typename...T>> void f(); f<std::vector>();`
In each case where a mangling changed, the change fixes a mangling collision.
Note that only function templates are affected, not class templates or variable templates, and only new constructs (template parameters with deduced types, constrained templates) and esoteric constructs (templates with template template parameters with non-matching template template arguments, most of which Clang still does not accept by default due to `-frelaxed-template-template-args` not being enabled by default), so the risk to ABI stability from this change is relatively low. Nonetheless, `-fclang-abi-compat=17` can be used to restore the old manglings for cases which we could successfully but incorrectly mangle before.
Fixes #48216, #49884, #61273
Reviewed By: erichkeane, #libc_abi
Differential Revision: https://reviews.llvm.org/D147655
show more ...
|
#
0a1aa6cd |
| 14-Sep-2023 |
Arthur Eubanks <aeubanks@google.com> |
[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295)
This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future chang
[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295)
This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future change to the params of
TargetMachine.
This matches other nearby enums.
For downstream users, this should be a fairly straightforward
replacement,
e.g. s/CodeGenOpt::Aggressive/CodeGenOptLevel::Aggressive
or s/CGFT_/CodeGenFileType::
show more ...
|
#
f45f1c35 |
| 14-Sep-2023 |
Leonard Chan <leonardchan@google.com> |
Reland "[clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used"
This reverts commit 070493ddbd9473499d6f00ca62bc6aa92808ed79 (and relands the original chan
Reland "[clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used"
This reverts commit 070493ddbd9473499d6f00ca62bc6aa92808ed79 (and relands the original change). This removes a test run that makes an assumption of RTTI being on by default for a given target.
show more ...
|
#
070493dd |
| 14-Sep-2023 |
Douglas Yung <douglas.yung@sony.com> |
Revert "Revert "Revert "[clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used"""
This reverts commit e16474ba2cba8fa69b413a83852d06c93155f8c9.
This chang
Revert "Revert "Revert "[clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used"""
This reverts commit e16474ba2cba8fa69b413a83852d06c93155f8c9.
This change is still causing a test failure on a bot: https://lab.llvm.org/buildbot/#/builders/139/builds/49666
show more ...
|
#
e16474ba |
| 13-Sep-2023 |
Leonard Chan <leonardchan@google.com> |
Revert "Revert "[clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used""
This attempts to reland 6385c1df919f237d4149fabf542a158f61010bf8 but with a fix fo
Revert "Revert "[clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used""
This attempts to reland 6385c1df919f237d4149fabf542a158f61010bf8 but with a fix for the test failure.
show more ...
|
#
87e11ecb |
| 13-Sep-2023 |
Leonard Chan <leonardchan@google.com> |
Revert "[clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used"
This reverts commit 6385c1df919f237d4149fabf542a158f61010bf8.
Reverting since this broke a
Revert "[clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used"
This reverts commit 6385c1df919f237d4149fabf542a158f61010bf8.
Reverting since this broke a windows builder: https://lab.llvm.org/buildbot/#/builders/216/builds/27252.
show more ...
|
#
6385c1df |
| 13-Sep-2023 |
Leonard Chan <leonardchan@google.com> |
[clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used
For programs that don't use RTTI, the rtti component is just replaced with a zero. This way, vtables
[clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used
For programs that don't use RTTI, the rtti component is just replaced with a zero. This way, vtables that don't use RTTI can still cooperate with vtables that use RTTI since offset calculations on the ABI level would still work. However, if throughout your whole program you don't use RTTI at all (such as the embedded case), then this is just an unused pointer-sized component that's wasting space. This adds an experimental option for removing the RTTI component from the vtable.
Some notes: - This is only allowed when RTTI is disabled, so we don't have to worry about things like `typeid` or `dynamic_cast`. - This is a "use at your own risk" since, similar to relative vtables, everything must be compiled with this since it's an ABI breakage. That is, a program compiled with this is not guaranteed to work with a program compiled without this, even if RTTI is disabled for both programs.
Note that this is a completely different ABI flavor orthogonal to the relative-vtables ABI. That is, they can be enabled/disabled independently.
Differential Revision: https://reviews.llvm.org/D152405
show more ...
|
#
e504194d |
| 29-Aug-2023 |
Justin Bogner <mail@justinbogner.com> |
[Driver][HLSL] Improve diagnostics for invalid shader model and stage
This adds more validation that a dxil triple is actually useable when compiling HLSL.
The OS field of the triple needs to be a
[Driver][HLSL] Improve diagnostics for invalid shader model and stage
This adds more validation that a dxil triple is actually useable when compiling HLSL.
The OS field of the triple needs to be a versioned shader model. Later, we should set a default if this is empty and check that the version is a shader model we can actually handle.
The Environment field of the triple needs to be specified and be a valid shader stage. I'd like to allow this to be empty and treat it like library, but allowing that currently crashes in DXIL metadata handling.
Differential Revision: https://reviews.llvm.org/D159103
show more ...
|