aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Passes/PassBuilder.cpp
diff options
context:
space:
mode:
authorRahul Joshi <rjoshi@nvidia.com>2025-05-23 08:30:29 -0700
committerGitHub <noreply@github.com>2025-05-23 08:30:29 -0700
commit52c2e45c11ee37d8efcf87cbfa5c9f23cbdd566b (patch)
tree9fb4a446894837cc4d8d8d88594b1f2324faa829 /llvm/lib/Passes/PassBuilder.cpp
parent204eb70af894770fb4b9107fbcf3003cb3f9cb72 (diff)
downloadllvm-52c2e45c11ee37d8efcf87cbfa5c9f23cbdd566b.zip
llvm-52c2e45c11ee37d8efcf87cbfa5c9f23cbdd566b.tar.gz
llvm-52c2e45c11ee37d8efcf87cbfa5c9f23cbdd566b.tar.bz2
[NFC][CodeGen] Adopt MachineFunctionProperties convenience accessors (#141101)
Diffstat (limited to 'llvm/lib/Passes/PassBuilder.cpp')
-rw-r--r--llvm/lib/Passes/PassBuilder.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index aa2ca77..49b49e2 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -448,7 +448,7 @@ public:
// Intentionally create a virtual register and set NoVRegs property.
auto &MRI = MF.getRegInfo();
MRI.createGenericVirtualRegister(LLT::scalar(8));
- MF.getProperties().set(MachineFunctionProperties::Property::NoVRegs);
+ MF.getProperties().setNoVRegs();
return PreservedAnalyses::all();
}
@@ -466,19 +466,18 @@ public:
}
static MachineFunctionProperties getRequiredProperties() {
- MachineFunctionProperties MFProps;
- MFProps.set(MachineFunctionProperties::Property::FailedISel);
- MFProps.set(MachineFunctionProperties::Property::FailsVerification);
- MFProps.set(MachineFunctionProperties::Property::IsSSA);
- MFProps.set(MachineFunctionProperties::Property::Legalized);
- MFProps.set(MachineFunctionProperties::Property::NoPHIs);
- MFProps.set(MachineFunctionProperties::Property::NoVRegs);
- MFProps.set(MachineFunctionProperties::Property::RegBankSelected);
- MFProps.set(MachineFunctionProperties::Property::Selected);
- MFProps.set(MachineFunctionProperties::Property::TiedOpsRewritten);
- MFProps.set(MachineFunctionProperties::Property::TracksDebugUserValues);
- MFProps.set(MachineFunctionProperties::Property::TracksLiveness);
- return MFProps;
+ return MachineFunctionProperties()
+ .setFailedISel()
+ .setFailsVerification()
+ .setIsSSA()
+ .setLegalized()
+ .setNoPHIs()
+ .setNoVRegs()
+ .setRegBankSelected()
+ .setSelected()
+ .setTiedOpsRewritten()
+ .setTracksDebugUserValues()
+ .setTracksLiveness();
}
static StringRef name() { return "RequireAllMachineFunctionPropertiesPass"; }
};