#
5b83bd13 |
| 19-Oct-2023 |
Kazu Hirata <kazu@google.com> |
[llvm] Use StringRef::contains (NFC)
|
#
df3478e4 |
| 18-Oct-2023 |
Stephen Tozer <stephen.tozer@sony.com> |
[LLVM] Add new attribute `optdebug` to optimize for debugging (#66632)
This patch adds a new fn attribute, `optdebug`, that specifies that
optimizations should make decisions that prioritize debug
[LLVM] Add new attribute `optdebug` to optimize for debugging (#66632)
This patch adds a new fn attribute, `optdebug`, that specifies that
optimizations should make decisions that prioritize debug info quality,
potentially at the cost of runtime performance.
This patch does not add any functional changes triggered by this
attribute, only the attribute itself. A subsequent patch will use this
flag to disable the post-RA scheduler.
show more ...
|
#
236228f4 |
| 05-Oct-2023 |
Nikita Popov <npopov@redhat.com> |
[BitcodeReader] Replace unsupported constexprs in metadata with undef
Metadata (via ValueAsMetadata) can reference constant expressions that may no longer be supported. These references can both be
[BitcodeReader] Replace unsupported constexprs in metadata with undef
Metadata (via ValueAsMetadata) can reference constant expressions that may no longer be supported. These references can both be in function-local metadata and module metadata, if the same expression is used in multiple functions. At least in theory, such references could also be in metadata proper, rather than just inside ValueAsMetadata references in calls.
Instead of trying to expand these expressions (which we can't reliably do), pretend that the constant has been deleted, which means that ValueAsMetadata references will get replaced with undef metadata.
Fixes https://github.com/llvm/llvm-project/issues/68281.
show more ...
|
#
05b86a8f |
| 28-Sep-2023 |
Nikita Popov <npopov@redhat.com> |
[Bitcode] Support expanding constant expressions in function metadata
This fixes the bitcode upgrade failure reported in https://reviews.llvm.org/D155924#4616789.
The expansion always happens in th
[Bitcode] Support expanding constant expressions in function metadata
This fixes the bitcode upgrade failure reported in https://reviews.llvm.org/D155924#4616789.
The expansion always happens in the entry block, so this may be inaccurate if there are trapping constant expressions.
show more ...
|
Revision tags: llvmorg-17.0.0-rc2 |
|
#
bbe8cd13 |
| 31-Jul-2023 |
Teresa Johnson <tejohnson@google.com> |
[LTO] Remove module id from summary index
The module paths string table mapped to both an id sequentially assigned during LTO linking, and the module hash. The former is leftover from before the mod
[LTO] Remove module id from summary index
The module paths string table mapped to both an id sequentially assigned during LTO linking, and the module hash. The former is leftover from before the module hash was added for caching and subsequently replaced use of the module id when renaming promoted symbols (to avoid affects due to link order changes). The sequentially assigned module id was not removed, however, as it was still a convenience when serializing to/from bitcode and assembly.
This patch removes the module id from this table, since it isn't strictly needed and can lead to confusion on when it is appropriate to use (e.g. see fix in D156525). It also takes a (likely not significant) amount of overhead. Where an integer module id is needed (e.g. bitcode writing), one is assigned on the fly.
There are a couple of test changes since the paths are now sorted alphanumerically when assigning ids on the fly during assembly writing, in order to ensure deterministic behavior.
Differential Revision: https://reviews.llvm.org/D156730
show more ...
|
#
5fde95bb |
| 21-Aug-2023 |
Nikita Popov <npopov@redhat.com> |
[IR] Remove SDivOperator/UDivOperator (NFC)
These haven't been supported as constant expressions for a while already, so having Operator variants of them doesn't make much sense.
|
Revision tags: llvmorg-17.0.0-rc1 |
|
#
2b418c3c |
| 28-Jul-2023 |
Jon Roelofs <jonathan_roelofs@apple.com> |
[BitcodeReader] Add missing () to disambiguate precedence. NFC
|
Revision tags: llvmorg-18-init |
|
#
505335a9 |
| 18-Jul-2023 |
Nikita Popov <npopov@redhat.com> |
[Bitcode] Remove uses of isOpaqueOrPointeeTypeEquals() (NFC)
|
#
61e0822e |
| 14-Jul-2023 |
Nikita Popov <npopov@redhat.com> |
[llvm][clang] Remove uses of isOpaquePointerTy() (NFC)
This now always returns true (for pointer types).
|
#
0d810937 |
| 14-Jul-2023 |
Nikita Popov <npopov@redhat.com> |
[llvm] Remove calls to supportsTypedPointers() (NFC)
Always returns false now.
|
#
a1ca3af3 |
| 05-Jul-2023 |
Matthew Voss <matthew.voss@sony.com> |
[llvm] A Unified LTO Bitcode Frontend
Here's a high level summary of the changes in this patch. For more information on rational, see the RFC. (https://discourse.llvm.org/t/rfc-a-unified-lto-bitcode
[llvm] A Unified LTO Bitcode Frontend
Here's a high level summary of the changes in this patch. For more information on rational, see the RFC. (https://discourse.llvm.org/t/rfc-a-unified-lto-bitcode-frontend/61774).
- Add config parameter to LTO backend, specifying which LTO mode is desired when using unified LTO. - Add unified LTO flag to the summary index for efficiency. Unified LTO modules can be detected without parsing the module. - Make sure that the ModuleID is generated by incorporating more types of symbols.
Differential Revision: https://reviews.llvm.org/D123803
show more ...
|
#
f0fa2d7c |
| 25-Jun-2023 |
Elliot Goodrich <elliotgoodrich@gmail.com> |
[llvm] Move AttributeMask to a separate header
Move `AttributeMask` out of `llvm/IR/Attributes.h` to a new file `llvm/IR/AttributeMask.h`. After doing this we can remove the `#include <bitset>` and
[llvm] Move AttributeMask to a separate header
Move `AttributeMask` out of `llvm/IR/Attributes.h` to a new file `llvm/IR/AttributeMask.h`. After doing this we can remove the `#include <bitset>` and `#include <set>` directives from `Attributes.h`. Since there are many headers including `Attributes.h`, but not needing the definition of `AttributeMask`, this causes unnecessary bloating of the translation units and slows down compilation.
This commit adds in the include directive for `llvm/IR/AttributeMask.h` to the handful of source files that need to see the definition.
This reduces the total number of preprocessing tokens across the LLVM source files in lib from (roughly) 1,917,509,187 to 1,902,982,273 - a reduction of ~0.76%. This should result in a small improvement in compilation time.
Differential Revision: https://reviews.llvm.org/D153728
show more ...
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4 |
|
#
17688986 |
| 06-May-2023 |
Teresa Johnson <tejohnson@google.com> |
[MemProf] Control availability of hot/cold operator new from LTO link
Adds an LTO option to indicate that whether we are linking with an allocator that supports hot/cold operator new interfaces. If
[MemProf] Control availability of hot/cold operator new from LTO link
Adds an LTO option to indicate that whether we are linking with an allocator that supports hot/cold operator new interfaces. If not, at the start of the LTO backends any existing memprof hot/cold attributes are removed from the IR, and we also remove memprof metadata so that post-LTO inlining doesn't add any new attributes.
This is done via setting a new flag in the module summary index. It is important to communicate via the index to the LTO backends so that distributed ThinLTO handles this correctly, as they are invoked by separate clang processes and the combined index is how we communicate information from the LTO link. Specifically, for distributed ThinLTO the LTO related processes look like: ``` # Thin link: $ lld --thinlto-index-only obj1.o ... objN.o -llib ... # ThinLTO backends: $ clang -x ir obj1.o -fthinlto-index=obj1.o.thinlto.bc -c -O2 ... $ clang -x ir objN.o -fthinlto-index=objN.o.thinlto.bc -c -O2 ```
It is during the thin link (lld --thinlto-index-only) that we have visibility into linker dependences and want to be able to pass the new option via -Wl,-supports-hot-cold-new. This will be recorded in the summary indexes created for the distributed backend processes (*.thinlto.bc) and queried from there, so that we don't need to know during those individual clang backends what allocation library was linked. Since in-process ThinLTO and regular LTO also use a combined index, for consistency we query the flag out of the index in all LTO backends.
Additionally, when the LTO option is disabled, exit early from the MemProfContextDisambiguation handling performed during LTO, as this is unnecessary.
Depends on D149117 and D149192.
Differential Revision: https://reviews.llvm.org/D149215
show more ...
|
Revision tags: llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4 |
|
#
bbfb13a5 |
| 06-Mar-2023 |
Nikita Popov <npopov@redhat.com> |
[ConstExpr] Remove select constant expression
This removes the select constant expression, as part of https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179. Uses of this expression
[ConstExpr] Remove select constant expression
This removes the select constant expression, as part of https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179. Uses of this expressions have already been removed in advance, so this just removes related infrastructure and updates tests.
Differential Revision: https://reviews.llvm.org/D145382
show more ...
|
#
62e46f26 |
| 27-Feb-2023 |
Paul Walker <paul.walker@arm.com> |
[LLVM] Remove support for constant scalable vector GEPs.
This work has fallen out from D134648 as a requirement to loosen the "constness" of vscale.
Differential Revision: https://reviews.llvm.org/
[LLVM] Remove support for constant scalable vector GEPs.
This work has fallen out from D134648 as a requirement to loosen the "constness" of vscale.
Differential Revision: https://reviews.llvm.org/D145404
show more ...
|
Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
5da67449 |
| 06-Dec-2022 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
IR: Add nofpclass parameter attribute
This carries a bitmask indicating forbidden floating-point value kinds in the argument or return value. This will enable interprocedural -ffinite-math-only opti
IR: Add nofpclass parameter attribute
This carries a bitmask indicating forbidden floating-point value kinds in the argument or return value. This will enable interprocedural -ffinite-math-only optimizations. This is primarily to cover the no-nans and no-infinities cases, but also covers the other floating point classes for free. Textually, this provides a number of names corresponding to bits in FPClassTest, e.g.
call nofpclass(nan inf) @must_be_finite() call nofpclass(snan) @cannot_be_snan()
This is more expressive than the existing nnan and ninf fast math flags. As an added bonus, you can represent fun things like nanf:
declare nofpclass(inf zero sub norm) float @only_nans()
Compared to nnan/ninf: - Can be applied to individual call operands as well as the return value - Can distinguish signaling and quiet nans - Distinguishes the sign of infinities - Can be safely propagated since it doesn't imply anything about other operands. - Does not apply to FP instructions; it's not a flag
This is one step closer to being able to retire "no-nans-fp-math" and "no-infs-fp-math". The one remaining situation where we have no way to represent no-nans/infs is for loads (if we wanted to solve this we could introduce !nofpclass metadata, following along with noundef/!noundef).
This is to help simplify the GPU builtin math library distribution. Currently the library code has explicit finite math only checks, read from global constants the compiler driver needs to set based on the compiler flags during linking. We end up having to internalize the library into each translation unit in case different linked modules have different math flags. By propagating known-not-nan and known-not-infinity information, we can automatically prune the edge case handling in most functions if the function is only reached from fast math uses.
show more ...
|
#
823186b1 |
| 14-Feb-2023 |
Vasileios Porpodas <vporpodas@google.com> |
Recommit: [NFC][IR] Make Module::getGlobalList() private
This reverts commit cb5f239363a3c94db5425c105fcd45e77d2a16a9.
|
#
cb5f2393 |
| 14-Feb-2023 |
Vasileios Porpodas <vporpodas@google.com> |
Revert "[NFC][IR] Make Module::getGlobalList() private"
This reverts commit ed3e3ee9e30dfbffd2170a770a49b36a7f444916.
|
#
ed3e3ee9 |
| 08-Feb-2023 |
Vasileios Porpodas <vporpodas@google.com> |
[NFC][IR] Make Module::getGlobalList() private
This patch adds several missing GlobalList modifier functions, like removeGlobalVariable(), eraseGlobalVariable() and insertGlobalVariable(). There is
[NFC][IR] Make Module::getGlobalList() private
This patch adds several missing GlobalList modifier functions, like removeGlobalVariable(), eraseGlobalVariable() and insertGlobalVariable(). There is no longer need to access the list directly so it also makes getGlobalList() private.
Differential Revision: https://reviews.llvm.org/D144027
show more ...
|
#
62c7f035 |
| 07-Feb-2023 |
Archibald Elliott <archibald.elliott@arm.com> |
[NFC][TargetParser] Remove llvm/ADT/Triple.h
I also ran `git clang-format` to get the headers in the right order for the new location, which has changed the order of other headers in two files.
|
#
9e845fe4 |
| 01-Feb-2023 |
Guillaume Chatelet <gchatelet@google.com> |
[NFC] Use GlobalObject::setAlignment that takes an Align in BitcodeReader
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5 |
|
#
778cf543 |
| 03-Nov-2022 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
IR: Add atomicrmw uinc_wrap and udec_wrap
These are essentially add/sub 1 with a clamping value.
AMDGPU has instructions for these. CUDA/HIP expose these as atomicInc/atomicDec. Currently we use ta
IR: Add atomicrmw uinc_wrap and udec_wrap
These are essentially add/sub 1 with a clamping value.
AMDGPU has instructions for these. CUDA/HIP expose these as atomicInc/atomicDec. Currently we use target intrinsics for these, but those do no carry the ordering and syncscope. Add these to atomicrmw so we can carry these and benefit from the regular legalization processes.
show more ...
|
#
c33b9395 |
| 18-Jan-2023 |
Sebastian Neubauer <Sebastian.Neubauer@amd.com> |
[BitcodeReader] Allow reading pointer types from old IR
When opaque pointers are enabled and old IR with typed pointers is read, the BitcodeReader automatically upgrades all typed pointers to opaque
[BitcodeReader] Allow reading pointer types from old IR
When opaque pointers are enabled and old IR with typed pointers is read, the BitcodeReader automatically upgrades all typed pointers to opaque pointers. This is a lossy conversion, i.e. when a function argument is a pointer and unused, it’s impossible to reconstruct the original type behind the pointer.
There are cases where the type information of pointers is needed. One is reading DXIL, which is bitcode of old LLVM IR and makes a lot of use of pointers in function signatures. We’d like to keep using up-to-date llvm to read in and process DXIL, so in the face of opaque pointers, we need some way to access the type information of pointers from the read bitcode.
This patch allows extracting type information by supplying functions to parseBitcodeFile that get called for each function signature or metadata value. The function can access the type information via the reader’s type IDs and the getTypeByID and getContainedTypeID functions. The tests exemplarily shows how type info from pointers can be stored in metadata for use after the BitcodeReader finished.
Differential Revision: https://reviews.llvm.org/D127728
show more ...
|
#
610abe80 |
| 18-Jan-2023 |
Nikita Popov <npopov@redhat.com> |
Revert "[BitcodeReader] Allow reading pointer types from old IR"
This reverts commit b56df190b01335506ce30a4559d880da76d1a181.
The unit tests are implemented in a way that requires support for writ
Revert "[BitcodeReader] Allow reading pointer types from old IR"
This reverts commit b56df190b01335506ce30a4559d880da76d1a181.
The unit tests are implemented in a way that requires support for writing typed pointer bitcode, which is going away soon. Please rewrite it in a way that not have requirement, e.g. by shipping pre-compiled bitcode, as we do for integration tests.
show more ...
|
#
b56df190 |
| 17-Jan-2023 |
Sebastian Neubauer <Sebastian.Neubauer@amd.com> |
[BitcodeReader] Allow reading pointer types from old IR
When opaque pointers are enabled and old IR with typed pointers is read, the BitcodeReader automatically upgrades all typed pointers to opaque
[BitcodeReader] Allow reading pointer types from old IR
When opaque pointers are enabled and old IR with typed pointers is read, the BitcodeReader automatically upgrades all typed pointers to opaque pointers. This is a lossy conversion, i.e. when a function argument is a pointer and unused, it’s impossible to reconstruct the original type behind the pointer.
There are cases where the type information of pointers is needed. One is reading DXIL, which is bitcode of old LLVM IR and makes a lot of use of pointers in function signatures. We’d like to keep using up-to-date llvm to read in and process DXIL, so in the face of opaque pointers, we need some way to access the type information of pointers from the read bitcode.
This patch allows extracting type information by supplying functions to parseBitcodeFile that get called for each function signature or metadata value. The function can access the type information via the reader’s type IDs and the getTypeByID and getContainedTypeID functions. The tests exemplarily shows how type info from pointers can be stored in metadata for use after the BitcodeReader finished.
Differential Revision: https://reviews.llvm.org/D127728
show more ...
|