aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
diff options
context:
space:
mode:
authorRahul Joshi <rjoshi@nvidia.com>2025-05-22 08:07:52 -0700
committerGitHub <noreply@github.com>2025-05-22 08:07:52 -0700
commit1fdf02ad5a4ca155017eea22688365a20aab077c (patch)
tree38da88552269eba7d8e30bfadbbf0c8d60375127 /llvm/lib/CodeGen/MIRParser/MIRParser.cpp
parenteee958285bde228df2893f70f879c1af8ec8386c (diff)
downloadllvm-1fdf02ad5a4ca155017eea22688365a20aab077c.zip
llvm-1fdf02ad5a4ca155017eea22688365a20aab077c.tar.gz
llvm-1fdf02ad5a4ca155017eea22688365a20aab077c.tar.bz2
[LLVM][CodeGen] Add convenience accessors for MachineFunctionProperties (#140002)users/pcc/spr/main.elf-add-branch-to-branch-optimization
Add per-property has<Prop>/set<Prop>/reset<Prop> functions to MachineFunctionProperties.
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIRParser.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIRParser.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
index 6e63f1c..a57bda5 100644
--- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
@@ -434,7 +434,7 @@ bool MIRParserImpl::computeFunctionProperties(
MF.setHasInlineAsm(HasInlineAsm);
if (HasTiedOps && AllTiedOpsRewritten)
- Properties.set(MachineFunctionProperties::Property::TiedOpsRewritten);
+ Properties.setTiedOpsRewritten();
if (ComputedPropertyHelper(YamlMF.IsSSA, isSSA(MF),
MachineFunctionProperties::Property::IsSSA)) {
@@ -556,21 +556,19 @@ MIRParserImpl::initializeMachineFunction(const yaml::MachineFunction &YamlMF,
MF.setHasEHFunclets(YamlMF.HasEHFunclets);
MF.setIsOutlined(YamlMF.IsOutlined);
+ MachineFunctionProperties &Props = MF.getProperties();
if (YamlMF.Legalized)
- MF.getProperties().set(MachineFunctionProperties::Property::Legalized);
+ Props.setLegalized();
if (YamlMF.RegBankSelected)
- MF.getProperties().set(
- MachineFunctionProperties::Property::RegBankSelected);
+ Props.setRegBankSelected();
if (YamlMF.Selected)
- MF.getProperties().set(MachineFunctionProperties::Property::Selected);
+ Props.setSelected();
if (YamlMF.FailedISel)
- MF.getProperties().set(MachineFunctionProperties::Property::FailedISel);
+ Props.setFailedISel();
if (YamlMF.FailsVerification)
- MF.getProperties().set(
- MachineFunctionProperties::Property::FailsVerification);
+ Props.setFailsVerification();
if (YamlMF.TracksDebugUserValues)
- MF.getProperties().set(
- MachineFunctionProperties::Property::TracksDebugUserValues);
+ Props.setTracksDebugUserValues();
PerFunctionMIParsingState PFS(MF, SM, IRSlots, *Target);
if (parseRegisterInfo(PFS, YamlMF))