aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineRegisterInfo.cpp
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2024-06-14 08:51:56 +0100
committerGitHub <noreply@github.com>2024-06-14 08:51:56 +0100
commit706e1975400b3f30bd406b694bb711a7c7dbe1c4 (patch)
tree6070cc4b97549c0bd2a7cda2c122ea398a828f92 /llvm/lib/CodeGen/MachineRegisterInfo.cpp
parentd712ae4a21822a51817941e7007e0dd41343cde3 (diff)
downloadllvm-706e1975400b3f30bd406b694bb711a7c7dbe1c4.zip
llvm-706e1975400b3f30bd406b694bb711a7c7dbe1c4.tar.gz
llvm-706e1975400b3f30bd406b694bb711a7c7dbe1c4.tar.bz2
[CodeGen] Remove target SubRegLiveness flags (#95437)
This removes the uses of target flags to disable subreg liveness, relying on the `-enable-subreg-liveness` flag instead. The `-enable-subreg-liveness` flag has been changed to take precedence over the subtarget if set, and one use of `Subtarget->enableSubRegLiveness()` has been changed to `MRI->subRegLivenessEnabled()` to make sure the option properly applies.
Diffstat (limited to 'llvm/lib/CodeGen/MachineRegisterInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineRegisterInfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineRegisterInfo.cpp b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
index b0c1838b..3caa96c 100644
--- a/llvm/lib/CodeGen/MachineRegisterInfo.cpp
+++ b/llvm/lib/CodeGen/MachineRegisterInfo.cpp
@@ -41,8 +41,10 @@ static cl::opt<bool> EnableSubRegLiveness("enable-subreg-liveness", cl::Hidden,
void MachineRegisterInfo::Delegate::anchor() {}
MachineRegisterInfo::MachineRegisterInfo(MachineFunction *MF)
- : MF(MF), TracksSubRegLiveness(MF->getSubtarget().enableSubRegLiveness() &&
- EnableSubRegLiveness) {
+ : MF(MF),
+ TracksSubRegLiveness(EnableSubRegLiveness.getNumOccurrences()
+ ? EnableSubRegLiveness
+ : MF->getSubtarget().enableSubRegLiveness()) {
unsigned NumRegs = getTargetRegisterInfo()->getNumRegs();
VRegInfo.reserve(256);
RegAllocHints.reserve(256);