Revision tags: llvmorg-21-init |
|
#
4a486e77 |
| 19-Jan-2025 |
Craig Topper <craig.topper@sifive.com> |
[CodeGen] Use Register/MCRegister::isPhysical. NFC
|
#
0d71b3e4 |
| 14-Jan-2025 |
Jay Foad <jay.foad@amd.com> |
[CodeGen] Remove unused argument from getCoveringSubRegIndexes. NFC. (#122884)
|
Revision tags: llvmorg-19.1.7 |
|
#
2e300321 |
| 23-Dec-2024 |
Pengcheng Wang <wangpengcheng.pp@bytedance.com> |
[TRI][RISCV] Add methods to get common register class of two registers (#118435)
Here we add two methods `getCommonMinimalPhysRegClass` and a LLT version `getCommonMinimalPhysRegClassLLT`, which ret
[TRI][RISCV] Add methods to get common register class of two registers (#118435)
Here we add two methods `getCommonMinimalPhysRegClass` and a LLT version `getCommonMinimalPhysRegClassLLT`, which return the most sub register class of the right type that contains these two input registers.
We don't overload the `getMinimalPhysRegClass` as there will be ambiguities.
We use it to simplify some code in RISC-V target.
show more ...
|
Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
735ab61a |
| 13-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[CodeGen] Remove unused includes (NFC) (#115996)
Identified with misc-include-cleaner.
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4 |
|
#
cd3667d1 |
| 02-Sep-2024 |
Craig Topper <craig.topper@sifive.com> |
[CodeGen] Update a few places that were passing Register to raw_ostream::operator<< (#106877)
These would implicitly cast the register to `unsigned`. Switch most of
them to use printReg will give a
[CodeGen] Update a few places that were passing Register to raw_ostream::operator<< (#106877)
These would implicitly cast the register to `unsigned`. Switch most of
them to use printReg will give a more readable output. Change some
others to use Register::id() so we can eventually remove the implicit
cast to `unsigned`.
show more ...
|
Revision tags: llvmorg-19.1.0-rc3 |
|
#
41491c77 |
| 07-Aug-2024 |
Alexis Engelke <engelke@in.tum.de> |
[CodeGen] Allocate RegAllocHints map lazily (#102186)
This hint map is not required whenever a new register is added, in fact,
at -O0, it is not used at all. Growing this map is quite expensive, as
[CodeGen] Allocate RegAllocHints map lazily (#102186)
This hint map is not required whenever a new register is added, in fact,
at -O0, it is not used at all. Growing this map is quite expensive, as
SmallVectors are not trivially copyable.
Grow this map only when hints are actually added to avoid multiple grows
and grows when no hints are added at all.
show more ...
|
Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7 |
|
#
9fe7aef1 |
| 29-May-2024 |
aengelke <engelke@in.tum.de> |
[CodeGen] Don't check attrs for stack realign (#92564)
shouldRealignStack/canRealignStack are repeatedly called in PEI (through
hasStackRealignment). Checking function attributes is expensive, so
[CodeGen] Don't check attrs for stack realign (#92564)
shouldRealignStack/canRealignStack are repeatedly called in PEI (through
hasStackRealignment). Checking function attributes is expensive, so
cache this data in the MachineFrameInfo, which had most data already.
This slightly changes the semantics of `MachineFrameInfo::ForcedRealign`
to be also true when the `stackrealign` attribute is set.
show more ...
|
Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3 |
|
#
baf66ec0 |
| 27-Mar-2024 |
Craig Topper <craig.topper@sifive.com> |
[Target][RISCV] Add HwMode support to subregister index size/offset. (#86368)
This is needed to provide proper size and offset for the GPRPair subreg
indices on RISC-V. The size of a GPR already us
[Target][RISCV] Add HwMode support to subregister index size/offset. (#86368)
This is needed to provide proper size and offset for the GPRPair subreg
indices on RISC-V. The size of a GPR already uses HwMode. Previously we
said the subreg indices have unknown size and offset, but this stops
DwarfExpression::addMachineReg from being able to find the registers
that make up the pair.
I believe this fixes https://github.com/llvm/llvm-project/issues/85864
but need to verify.
show more ...
|
#
fb329f18 |
| 22-Mar-2024 |
Craig Topper <craig.topper@sifive.com> |
[Target] Move SubRegIdxRanges from MCSubtargetInfo to TargetInfo. (#86245)
I'm planning to add HwMode support to SubRegIdxRanges for RISC-V GPR
pairs. The MC layer is currently unaware of the HwMod
[Target] Move SubRegIdxRanges from MCSubtargetInfo to TargetInfo. (#86245)
I'm planning to add HwMode support to SubRegIdxRanges for RISC-V GPR
pairs. The MC layer is currently unaware of the HwMode for registers and
I'd like to keep it that way.
This information is not used by the MC layer so I think it is safe to
move it.
show more ...
|
Revision tags: 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 |
|
#
184ca395 |
| 25-Jan-2024 |
Nico Weber <thakis@chromium.org> |
[llvm] Move CodeGenTypes library to its own directory (#79444)
Finally addresses https://reviews.llvm.org/D148769#4311232 :)
No behavior change.
|
Revision tags: llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5 |
|
#
ac4ff616 |
| 07-Nov-2023 |
Michael Maitland <michaeltmaitland@gmail.com> |
[CodeGen][MachineVerifier] Use TypeSize instead of unsigned for getRe… (#70881)
…gSizeInBits
This patch changes getRegSizeInBits to return a TypeSize instead of an
unsigned in the case that a vi
[CodeGen][MachineVerifier] Use TypeSize instead of unsigned for getRe… (#70881)
…gSizeInBits
This patch changes getRegSizeInBits to return a TypeSize instead of an
unsigned in the case that a virtual register has a scalable LLT. In the
case that register is physical, a Fixed TypeSize is returned.
The MachineVerifier pass is updated to allow copies between fixed and
scalable operands as long as the Src size will fit into the Dest size.
This is a precommit which will be stacked on by a change to GISel to
generate COPYs with a scalable destination but a fixed size source.
This patch is stacked on https://github.com/llvm/llvm-project/pull/70893
for the ability to use scalable vector types in MIR tests.
show more ...
|
Revision tags: 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 |
|
#
a4202e65 |
| 21-Aug-2023 |
Benjamin Kramer <benny.kra@googlemail.com> |
Move VTList pointer out of RegClassInfos
Store it in TargetRegisterInfo instead. Worth 54k on llc size.
|
Revision tags: 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 |
|
#
c1221251 |
| 10-Apr-2023 |
NAKAMURA Takumi <geek4civic@gmail.com> |
Restore CodeGen/MachineValueType.h from `Support`
This is rework of;
- rG13e77db2df94 (r328395; MVT)
Since `LowLevelType.h` has been restored to `CodeGen`, `MachinveValueType.h` can be restored
Restore CodeGen/MachineValueType.h from `Support`
This is rework of;
- rG13e77db2df94 (r328395; MVT)
Since `LowLevelType.h` has been restored to `CodeGen`, `MachinveValueType.h` can be restored as well.
Depends on D148767
Differential Revision: https://reviews.llvm.org/D149024
show more ...
|
#
14bc3748 |
| 17-Apr-2023 |
Jay Foad <jay.foad@amd.com> |
[MC] Use subregs/superregs instead of MCSubRegIterator/MCSuperRegIterator. NFC.
Differential Revision: https://reviews.llvm.org/D148613
|
Revision tags: llvmorg-16.0.1 |
|
#
eac8e25e |
| 22-Mar-2023 |
Jay Foad <jay.foad@amd.com> |
[CodeGen] Fix type of MachineRegisterInfo::RegAllocHints. NFC.
The first member of the pair should be unsigned instead of Register because it is the hint type, 0 for simple (target independent) hint
[CodeGen] Fix type of MachineRegisterInfo::RegAllocHints. NFC.
The first member of the pair should be unsigned instead of Register because it is the hint type, 0 for simple (target independent) hints and other values for target dependent hints.
Differential Revision: https://reviews.llvm.org/D146646
show more ...
|
Revision tags: llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2 |
|
#
55e2cd16 |
| 28-Jan-2023 |
Kazu Hirata <kazu@google.com> |
Use llvm::count{lr}_{zero,one} (NFC)
|
Revision tags: llvmorg-16.0.0-rc1, llvmorg-17-init |
|
#
fd330012 |
| 12-Jan-2023 |
Pierre van Houtryve <pierre.vanhoutryve@amd.com> |
[CodeGen] Prevent overlapping subregs in getCoveringSubRegIndexes
If `getCoveringSubRegIndexes` returns a set of subregister indexes where some subregisters overlap others, it can create unsatisfiab
[CodeGen] Prevent overlapping subregs in getCoveringSubRegIndexes
If `getCoveringSubRegIndexes` returns a set of subregister indexes where some subregisters overlap others, it can create unsatisfiable copy bundles that eventually cause VirtRegRewriter to error out due to "cycles in copy bundle".
We can simply prevent this by making the algorithm skip over subregisters indexes that would cause an overlap with already-covered lanes.
Note that in the case of AMDGPU, this problem is caused by the lack of subregisters indexes for 13/14/15-register tuples. We have everything up until 12, then we have 16 and 32 but nothing between 12 and 16. This means that the best candidate to do the least amount of copies when splitting a 29-register tuple was to copy (e.g.) 0-15 and 14-29, causing an overlap. With this change, getCoveringSubRegIndexes will now prefer using something like 0-15, 16-28 and 1
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D141576
show more ...
|
#
e72ca520 |
| 13-Jan-2023 |
Craig Topper <craig.topper@sifive.com> |
[CodeGen] Remove uses of Register::isPhysicalRegister/isVirtualRegister. NFC
Use isPhysical/isVirtual methods.
Reviewed By: foad
Differential Revision: https://reviews.llvm.org/D141715
|
Revision tags: llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, 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, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, 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, llvmorg-14.0.0-rc1 |
|
#
ffe8720a |
| 02-Feb-2022 |
serge-sans-paille <sguelton@redhat.com> |
Reduce dependencies on llvm/BinaryFormat/Dwarf.h
This header is very large (3M Lines once expended) and was included in location where dwarf-specific information were not needed.
More specifically,
Reduce dependencies on llvm/BinaryFormat/Dwarf.h
This header is very large (3M Lines once expended) and was included in location where dwarf-specific information were not needed.
More specifically, this commit suppresses the dependencies on llvm/BinaryFormat/Dwarf.h in two headers: llvm/IR/IRBuilder.h and llvm/IR/DebugInfoMetadata.h. As these headers (esp. the former) are widely used, this has a decent impact on number of preprocessed lines generated during compilation of LLVM, as showcased below.
This is achieved by moving some definitions back to the .cpp file, no performance impact implied[0].
As a consequence of that patch, downstream user may need to manually some extra files:
llvm/IR/IRBuilder.h no longer includes llvm/BinaryFormat/Dwarf.h llvm/IR/DebugInfoMetadata.h no longer includes llvm/BinaryFormat/Dwarf.h
In some situations, codes maybe relying on the fact that llvm/BinaryFormat/Dwarf.h was including llvm/ADT/Triple.h, this hidden dependency now needs to be explicit.
$ clang++ -E -Iinclude -I../llvm/include ../llvm/lib/Transforms/Scalar/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l after: 10978519 before: 11245451
Related Discourse thread: https://llvm.discourse.group/t/include-what-you-use-include-cleanup [0] https://llvm-compile-time-tracker.com/compare.php?from=fa7145dfbf94cb93b1c3e610582c495cb806569b&to=995d3e326ee1d9489145e20762c65465a9caeab4&stat=instructions
Differential Revision: https://reviews.llvm.org/D118781
show more ...
|
Revision tags: llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
#
2aed0813 |
| 07-Jan-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Use true/false instead of 1/0 (NFC)
Identified with modernize-use-bool-literals.
|
#
630c847b |
| 07-Dec-2021 |
Kazu Hirata <kazu@google.com> |
[llvm] Use range-based for loops (NFC)
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1 |
|
#
a383d325 |
| 11-May-2021 |
Jay Foad <jay.foad@amd.com> |
[TargetRegisterInfo] Speed up getAllocatableSet. NFCI.
MachineRegisterInfo caches the reserved register set that is computed by by TargetRegisterInfo::getReservedRegs, so call into MRI to get the re
[TargetRegisterInfo] Speed up getAllocatableSet. NFCI.
MachineRegisterInfo caches the reserved register set that is computed by by TargetRegisterInfo::getReservedRegs, so call into MRI to get the reserved regs to avoid recomputing them.
In particular this speeds up AMDGPU's SIFormMemoryClauses pass because AMDGPU has a particularly complicated reserved set that is expensive to compute.
Differential Revision: https://reviews.llvm.org/D102318
show more ...
|
#
cea97fc0 |
| 17-Apr-2021 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
GlobalISel: Relax verification of physical register copy types
This was picking a concrete size for a physical register, and enforcing exact match on the virtual register's type size. Some targets a
GlobalISel: Relax verification of physical register copy types
This was picking a concrete size for a physical register, and enforcing exact match on the virtual register's type size. Some targets add multiple types to a register class, and some are smaller than the full bit width. For example x86 adds f32 to 128-bit xmm registers, and AMDGPU adds i16/f16 to 32-bit registers.
It might be better to represent these cases as a copy of the full register and an extraction of the subpart, but a lot of code assumes you can directly copy. This will help fix the current usage of the DAG calling convention infrastructure which is incompatible with how GlobalISel is now using it.
The API is somewhat cumbersome here, but I just mirrored the existing functions, except now with LLTs (and allow returning null on failure, unlike the MVT version). I think the concept of selecting register classes based on type is flawed to begin with, but I'm trying to keep this compatible with the existing handling.
show more ...
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
#
a9968c0a |
| 15-Mar-2021 |
Tomas Matheson <tomas.matheson@arm.com> |
[NFC][CodeGen] Tidy up TargetRegisterInfo stack realignment functions
Currently needsStackRealignment returns false if canRealignStack returns false. This means that the behavior of needsStackRealig
[NFC][CodeGen] Tidy up TargetRegisterInfo stack realignment functions
Currently needsStackRealignment returns false if canRealignStack returns false. This means that the behavior of needsStackRealignment does not correspond to it's name and description; a function might need stack realignment, but if it is not possible then this function returns false. Furthermore, needsStackRealignment is not virtual and therefore some backends have made use of canRealignStack to indicate whether a function needs stack realignment.
This patch attempts to clarify the situation by separating them and introducing new names:
- shouldRealignStack - true if there is any reason the stack should be realigned
- canRealignStack - true if we are still able to realign the stack (e.g. we can still reserve/have reserved a frame pointer)
- hasStackRealignment = shouldRealignStack && canRealignStack (not target customisable)
Targets can now override shouldRealignStack to indicate that stack realignment is required.
This change will make it easier in a future change to handle the case where we need to realign the stack but can't do so (for example when the register allocator creates an aligned spill after the frame pointer has been eliminated).
Differential Revision: https://reviews.llvm.org/D98716
Change-Id: Ib9a4d21728bf9d08a545b4365418d3ffe1af4d87
show more ...
|
Revision tags: llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
#
1b3d8dde |
| 02-Dec-2020 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
CodeGen: Move function to get subregister indexes to cover a LaneMask
Return the best covering index, and additional needed to complete the mask. This logically belongs in TargetRegisterInfo, althou
CodeGen: Move function to get subregister indexes to cover a LaneMask
Return the best covering index, and additional needed to complete the mask. This logically belongs in TargetRegisterInfo, although I ended up not needing it for why I originally split this out.
show more ...
|