|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
2eade1db |
| 30-Jun-2022 |
Arthur Eubanks <[email protected]> |
[WPD] Use new llvm.public.type.test intrinsic for potentially publicly visible classes
Turning on opaque pointers has uncovered an issue with WPD where we currently pattern match away `assume(type.t
[WPD] Use new llvm.public.type.test intrinsic for potentially publicly visible classes
Turning on opaque pointers has uncovered an issue with WPD where we currently pattern match away `assume(type.test)` in WPD so that a later LTT doesn't resolve the type test to undef and introduce an `assume(false)`. The pattern matching can fail in cases where we transform two `assume(type.test)`s into `assume(phi(type.test.1, type.test.2))`.
Currently we create `assume(type.test)` for all virtual calls that might be devirtualized. This is to support `-Wl,--lto-whole-program-visibility`.
To prevent this, all virtual calls that may not be in the same LTO module instead use a new `llvm.public.type.test` intrinsic in place of the `llvm.type.test`. Then when we know if `-Wl,--lto-whole-program-visibility` is passed or not, we can either replace all `llvm.public.type.test` with `llvm.type.test`, or replace all `llvm.public.type.test` with `true`. This prevents WPD from trying to pattern match away `assume(type.test)` for public virtual calls when failing the pattern matching will result in miscompiles.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D128955
show more ...
|
| #
9ac38649 |
| 29-Jun-2022 |
Nikita Popov <[email protected]> |
[ConstExpr] Don't create insertvalue expressions
In preparation for the removal in D128719, this stops creating insertvalue constant expressions (well, unless they are directly used in LLVM IR).
Di
[ConstExpr] Don't create insertvalue expressions
In preparation for the removal in D128719, this stops creating insertvalue constant expressions (well, unless they are directly used in LLVM IR).
Differential Revision: https://reviews.llvm.org/D128792
show more ...
|
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4 |
|
| #
5548e807 |
| 17-May-2022 |
Nikita Popov <[email protected]> |
[IR] Remove support for extractvalue constant expression
This removes the extractvalue constant expression, as part of https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179. extrac
[IR] Remove support for extractvalue constant expression
This removes the extractvalue constant expression, as part of https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179. extractvalue is already not supported in bitcode, so we do not need to worry about bitcode auto-upgrade.
Uses of ConstantExpr::getExtractValue() should be replaced with IRBuilder::CreateExtractValue() (if the fact that the result is constant is not important) or ConstantFoldExtractValueInstruction() (if it is). Though for this particular case, it is also possible and usually preferable to use getAggregateElement() instead.
The C API function LLVMConstExtractValue() is removed, as the underlying constant expression no longer exists. Instead, LLVMBuildExtractValue() should be used (which will constant fold or create an instruction). Depending on the use-case, LLVMGetAggregateElement() may also be used instead.
Differential Revision: https://reviews.llvm.org/D125795
show more ...
|
| #
a70b39ab |
| 15-Jun-2022 |
Arthur Eubanks <[email protected]> |
[clang] Don't emit type test/assume for virtual classes that should never participate in WPD
Reviewed By: pcc
Differential Revision: https://reviews.llvm.org/D127876
|
| #
6a867303 |
| 10-May-2022 |
David Tenty <[email protected]> |
Reland [clang][AIX] add option mdefault-visibility-export-mapping
The option mdefault-visibility-export-mapping is created to allow mapping default visibility to an explicit shared library export (e
Reland [clang][AIX] add option mdefault-visibility-export-mapping
The option mdefault-visibility-export-mapping is created to allow mapping default visibility to an explicit shared library export (e.g. dllexport). Exactly how and if this is manifested is target dependent (since it depends on how they map dllexport in the IR).
Three values are provided for the option:
* none: the default and behavior without the option, no additional export linkage information is created. * explicit: add the export for entities with explict default visibility from the source, including RTTI * all: add the export for all entities with default visibility
This option is useful for targets which do not export symbols as part of their usual default linkage behaviour (e.g. AIX), such targets traditionally specified such information in external files (e.g. export lists), but this mapping allows them to use the visibility information typically used for this purpose on other (e.g. ELF) platforms.
This relands commit: 8c8a2679a20f621994fa904bcfc68775e7345edc
with fixes for the compile time and assert problems that were reported by:
* making shouldMapVisibilityToDLLExport inline and provide an early return in the case where no mapping is in effect (aka non-AIX platforms) * don't try to export RTTI types which we will give internal linkage to
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D126340
show more ...
|
| #
d42fe9aa |
| 02-Jun-2022 |
Hans Wennborg <[email protected]> |
Revert "[clang][AIX] add option mdefault-visibility-export-mapping"
This caused assertions, see comment on the code review:
llvm/clang/lib/AST/Decl.cpp:1510: clang::LinkageInfo clang::LinkageComput
Revert "[clang][AIX] add option mdefault-visibility-export-mapping"
This caused assertions, see comment on the code review:
llvm/clang/lib/AST/Decl.cpp:1510: clang::LinkageInfo clang::LinkageComputer::getLVForDecl(const clang::NamedDecl *, clang::LVComputationKind): Assertion `D->getCachedLinkage() == LV.getLinkage()' failed.
> The option mdefault-visibility-export-mapping is created to allow > mapping default visibility to an explicit shared library export > (e.g. dllexport). Exactly how and if this is manifested is target > dependent (since it depends on how they map dllexport in the IR). > > Three values are provided for the option: > > * none: the default and behavior without the option, no additional export linkage information is created. > * explicit: add the export for entities with explict default visibility from the source, including RTTI > * all: add the export for all entities with default visibility > > This option is useful for targets which do not export symbols as part of > their usual default linkage behaviour (e.g. AIX), such targets > traditionally specified such information in external files (e.g. export > lists), but this mapping allows them to use the visibility information > typically used for this purpose on other (e.g. ELF) platforms. > > Reviewed By: MaskRay > > Differential Revision: https://reviews.llvm.org/D126340
This reverts commit 8c8a2679a20f621994fa904bcfc68775e7345edc.
show more ...
|
| #
8c8a2679 |
| 10-May-2022 |
David Tenty <[email protected]> |
[clang][AIX] add option mdefault-visibility-export-mapping
The option mdefault-visibility-export-mapping is created to allow mapping default visibility to an explicit shared library export (e.g. dll
[clang][AIX] add option mdefault-visibility-export-mapping
The option mdefault-visibility-export-mapping is created to allow mapping default visibility to an explicit shared library export (e.g. dllexport). Exactly how and if this is manifested is target dependent (since it depends on how they map dllexport in the IR).
Three values are provided for the option:
* none: the default and behavior without the option, no additional export linkage information is created. * explicit: add the export for entities with explict default visibility from the source, including RTTI * all: add the export for all entities with default visibility
This option is useful for targets which do not export symbols as part of their usual default linkage behaviour (e.g. AIX), such targets traditionally specified such information in external files (e.g. export lists), but this mapping allows them to use the visibility information typically used for this purpose on other (e.g. ELF) platforms.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D126340
show more ...
|
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
6eec4835 |
| 23-Feb-2022 |
Arthur Eubanks <[email protected]> |
[clang] Remove getPointerElementType() in EmitVTableTypeCheckedLoad()
|
| #
1aeb4c6b |
| 14-Feb-2022 |
Nikita Popov <[email protected]> |
[ItaniumCXXABI] Avoid pointer element type accesses
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init |
|
| #
aa97bc11 |
| 21-Jan-2022 |
Nikita Popov <[email protected]> |
[NFC] Remove uses of PointerType::getElementType()
Instead use either Type::getPointerElementType() or Type::getNonOpaquePointerElementType().
This is part of D117885, in preparation for deprecatin
[NFC] Remove uses of PointerType::getElementType()
Instead use either Type::getPointerElementType() or Type::getNonOpaquePointerElementType().
This is part of D117885, in preparation for deprecating the API.
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3 |
|
| #
072e2a7c |
| 13-Jan-2022 |
Maurice Heumann <[email protected]> |
[MS] Implement on-demand TLS initialization for Microsoft CXX ABI
TLS initializers, for example constructors of thread-local variables, don't necessarily get called. If a thread was created before a
[MS] Implement on-demand TLS initialization for Microsoft CXX ABI
TLS initializers, for example constructors of thread-local variables, don't necessarily get called. If a thread was created before a module is loaded, the module's TLS initializers are not executed for this particular thread.
This is why Microsoft added support for dynamic TLS initialization. Before every use of thread-local variables, a check is added that runs the module's TLS initializers on-demand.
To do this, the method `__dyn_tls_on_demand_init` gets called. Internally, it simply calls `__dyn_tls_init`.
No additional TLS initializer that sets the guard needs to be emitted, as the guard always gets set by `__dyn_tls_init`. The guard is also checked again within `__dyn_tls_init`. This makes our check redundant, however, as Microsoft's compiler also emits this check, the behaviour is adopted here.
Reviewed By: majnemer
Differential Revision: https://reviews.llvm.org/D115456
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc2 |
|
| #
1f07a4a5 |
| 24-Dec-2021 |
Nikita Popov <[email protected]> |
[CodeGen] Avoid more pointer element type accesses
|
| #
e751d978 |
| 20-Dec-2021 |
Nikita Popov <[email protected]> |
[CodeGen] Avoid some pointer element type accesses
This avoids some pointer element type accesses when compiling C++ code.
|
| #
c3b624a1 |
| 15-Dec-2021 |
Nikita Popov <[email protected]> |
[CodeGen] Avoid deprecated ConstantAddress constructor
Change all uses of the deprecated constructor to pass the element type explicitly and drop it.
For cases where the correct element type was no
[CodeGen] Avoid deprecated ConstantAddress constructor
Change all uses of the deprecated constructor to pass the element type explicitly and drop it.
For cases where the correct element type was not immediately obvious to me or would require a slightly larger change I'm falling back to explicitly calling getPointerElementType() for now.
show more ...
|
| #
6c75ab5f |
| 06-Dec-2021 |
Aaron Ballman <[email protected]> |
Introduce _BitInt, deprecate _ExtInt
WG14 adopted the _ExtInt feature from Clang for C23, but renamed the type to be _BitInt. This patch does the vast majority of the work to rename _ExtInt to _BitI
Introduce _BitInt, deprecate _ExtInt
WG14 adopted the _ExtInt feature from Clang for C23, but renamed the type to be _BitInt. This patch does the vast majority of the work to rename _ExtInt to _BitInt, which accounts for most of its size. The new type is exposed in older C modes and all C++ modes as a conforming extension. However, there are functional changes worth calling out:
* Deprecates _ExtInt with a fix-it to help users migrate to _BitInt. * Updates the mangling for the type. * Updates the documentation and adds a release note to warn users what is going on. * Adds new diagnostics for use of _BitInt to call out when it's used as a Clang extension or as a pre-C23 compatibility concern. * Adds new tests for the new diagnostic behaviors.
I want to call out the ABI break specifically. We do not believe that this break will cause a significant imposition for early adopters of the feature, and so this is being done as a full break. If it turns out there are critical uses where recompilation is not an option for some reason, we can consider using ABI tags to ease the transition.
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
222305d6 |
| 09-Oct-2021 |
Richard Smith <[email protected]> |
PR51079: Treat thread_local variables with an incomplete class type as being not trivially destructible when determining if we can skip calling their thread wrapper function.
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
| #
fae0dfa6 |
| 06-Sep-2021 |
Qiu Chaofan <[email protected]> |
[Clang] Add __ibm128 type to represent ppc_fp128
Currently, we have no front-end type for ppc_fp128 type in IR. PowerPC target generates ppc_fp128 type from long double now, but there's option (-mab
[Clang] Add __ibm128 type to represent ppc_fp128
Currently, we have no front-end type for ppc_fp128 type in IR. PowerPC target generates ppc_fp128 type from long double now, but there's option (-mabi=(ieee|ibm)longdouble) to control it and we're going to do transition from IBM extended double-double ppc_fp128 to IEEE fp128 in the future.
This patch adds type __ibm128 which always represents ppc_fp128 in IR, as what GCC did for that type. Without this type in Clang, compilation will fail if compiling against future version of libstdcxx (which uses __ibm128 in headers).
Although all operations in backend for __ibm128 is done by software, only PowerPC enables support for it.
There's something not implemented in this commit, which can be done in future ones:
- Literal suffix for __ibm128 type. w/W is suitable as GCC documented. - __attribute__((mode(IF))) should be for __ibm128. - Complex __ibm128 type.
Reviewed By: rjmccall
Differential Revision: https://reviews.llvm.org/D93377
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc2 |
|
| #
cd4d6d71 |
| 25-Aug-2021 |
Richard Smith <[email protected]> |
PR48030: Fix COMDAT-related linking problem with C++ thread_local static data members.
Previously when emitting a C++ guarded initializer, we tried to work out what the enclosing function would be u
PR48030: Fix COMDAT-related linking problem with C++ thread_local static data members.
Previously when emitting a C++ guarded initializer, we tried to work out what the enclosing function would be used for and added it to the COMDAT containing the variable if we thought that doing so would be correct. But this was done from a context in which we didn't -- and realistically couldn't -- correctly infer how the enclosing function would be used.
Instead, add the initialization function to a COMDAT from the code that creates it, in the case where it makes sense to do so: when we know that the one and only reference to the initialization function is in @llvm.global.ctors and that reference is in the same COMDAT.
Reviewed By: rjmccall
Differential Revision: https://reviews.llvm.org/D108680
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init |
|
| #
73840f9f |
| 19-Jul-2021 |
Jamie Schmeiser <[email protected]> |
thread_local support for AIX
Summary: The AIX linker will produce errors on unresolved weak symbols. Change the generated code to not check for the initialization function but just call it and ensu
thread_local support for AIX
Summary: The AIX linker will produce errors on unresolved weak symbols. Change the generated code to not check for the initialization function but just call it and ensure that it always exists. Also, the AIX atexit routine has a different name (and signature) so call it correctly. Update the lit tests to test on AIX appropriately.
Author: Jamie Schmeiser <[email protected]> Reviewed By: hubert.reinterpretcast (Hubert Tong) Differential Revision: https://reviews.llvm.org/D104420
show more ...
|
| #
2c68eccc |
| 17-Jul-2021 |
Nikita Popov <[email protected]> |
[OpaquePtr] Remove uses of CreateGEP() without element type
Remove uses of to-be-deprecated API. In cases where the correct element type was not immediately obvious to me, fall back to explicit getP
[OpaquePtr] Remove uses of CreateGEP() without element type
Remove uses of to-be-deprecated API. In cases where the correct element type was not immediately obvious to me, fall back to explicit getPointerElementType().
show more ...
|
| #
6d3e7c78 |
| 17-Jul-2021 |
Nikita Popov <[email protected]> |
[OpaquePtr] Remove uses of CreateConstGEP1_32() without element type
Remove uses of to-be-deprecated API. I've fallen back to calling getPointerElementType() in some cases where the correct type was
[OpaquePtr] Remove uses of CreateConstGEP1_32() without element type
Remove uses of to-be-deprecated API. I've fallen back to calling getPointerElementType() in some cases where the correct type wasn't immediately obvious to me.
show more ...
|
| #
5071360e |
| 17-Jul-2021 |
Nikita Popov <[email protected]> |
[OpaquePtr] Remove uses of CGF.Builder.CreateConstInBoundsGEP1_64() without type
Remove uses of to-be-deprecated API.
|
| #
357756ec |
| 17-Jul-2021 |
Nikita Popov <[email protected]> |
[OpaquePtr] Remove uses of CreateConstGEP1_64() without element type
Remove uses of to-be-deprecated API.
|
| #
693251fb |
| 08-Jul-2021 |
Nikita Popov <[email protected]> |
[CodeGen] Avoid CreateGEP with nullptr type (NFC)
In preparation for dropping support for it. I've replaced it with a proper type where the correct type was obvious and left an explicit getPointerEl
[CodeGen] Avoid CreateGEP with nullptr type (NFC)
In preparation for dropping support for it. I've replaced it with a proper type where the correct type was obvious and left an explicit getPointerElementType() where it wasn't.
show more ...
|
| #
8d21d547 |
| 29-Jun-2021 |
Akira Hatanaka <[email protected]> |
[CodeGen] Stop creating fake FunctionDecls when generating IR for functions implicitly generated by the compiler
These fake functions would cause clang to crash if the changes proposed in https://re
[CodeGen] Stop creating fake FunctionDecls when generating IR for functions implicitly generated by the compiler
These fake functions would cause clang to crash if the changes proposed in https://reviews.llvm.org/D98799 were made.
show more ...
|