aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGen.cpp
diff options
context:
space:
mode:
authorJack Styles <99514724+Stylie777@users.noreply.github.com>2024-02-26 12:12:31 +0000
committerGitHub <noreply@github.com>2024-02-26 12:12:31 +0000
commit28233408a2c8670d7d94ae1bf18a2bb5f7194c32 (patch)
treea963ea9005f5b9122fcfe04285ae9320b984205c /llvm/lib/CodeGen/CodeGen.cpp
parent3d084e37ab038200df5f5ef371fdea2fcda05680 (diff)
downloadllvm-28233408a2c8670d7d94ae1bf18a2bb5f7194c32.zip
llvm-28233408a2c8670d7d94ae1bf18a2bb5f7194c32.tar.gz
llvm-28233408a2c8670d7d94ae1bf18a2bb5f7194c32.tar.bz2
[CodeGen] [ARM] Make RISC-V Init Undef Pass Target Independent and add support for the ARM Architecture. (#77770)
When using Greedy Register Allocation, there are times where early-clobber values are ignored, and assigned the same register. This is illeagal behaviour for these intructions. To get around this, using Pseudo instructions for early-clobber registers gives them a definition and allows Greedy to assign them to a different register. This then meets the ARM Architecture Reference Manual and matches the defined behaviour. This patch takes the existing RISC-V patch and makes it target independent, then adds support for the ARM Architecture. Doing this will ensure early-clobber restraints are followed when using the ARM Architecture. Making the pass target independent will also open up possibility that support other architectures can be added in the future.
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGen.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/CodeGen.cpp b/llvm/lib/CodeGen/CodeGen.cpp
index be18134..544f1b7 100644
--- a/llvm/lib/CodeGen/CodeGen.cpp
+++ b/llvm/lib/CodeGen/CodeGen.cpp
@@ -54,6 +54,7 @@ void llvm::initializeCodeGen(PassRegistry &Registry) {
initializeIfConverterPass(Registry);
initializeImplicitNullChecksPass(Registry);
initializeIndirectBrExpandLegacyPassPass(Registry);
+ initializeInitUndefPass(Registry);
initializeInterleavedLoadCombinePass(Registry);
initializeInterleavedAccessPass(Registry);
initializeJMCInstrumenterPass(Registry);