aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOutliner.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/MachineOutliner.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/MachineOutliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index ba125d9..e486123 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -962,10 +962,10 @@ MachineFunction *MachineOutliner::createOutlinedFunction(
computeAndPublishHashSequence(MF, OF.Candidates.size());
// Set normal properties for a late MachineFunction.
- MF.getProperties().reset(MachineFunctionProperties::Property::IsSSA);
- MF.getProperties().set(MachineFunctionProperties::Property::NoPHIs);
- MF.getProperties().set(MachineFunctionProperties::Property::NoVRegs);
- MF.getProperties().set(MachineFunctionProperties::Property::TracksLiveness);
+ MF.getProperties().resetIsSSA();
+ MF.getProperties().setNoPHIs();
+ MF.getProperties().setNoVRegs();
+ MF.getProperties().setTracksLiveness();
MF.getRegInfo().freezeReservedRegs();
// Compute live-in set for outlined fn
@@ -1111,8 +1111,7 @@ bool MachineOutliner::outline(
// anything we outline doesn't break liveness assumptions. The outlined
// functions themselves currently don't track liveness, but we should
// make sure that the ranges we yank things out of aren't wrong.
- if (MBB.getParent()->getProperties().hasProperty(
- MachineFunctionProperties::Property::TracksLiveness)) {
+ if (MBB.getParent()->getProperties().hasTracksLiveness()) {
// The following code is to add implicit def operands to the call
// instruction. It also updates call site information for moved
// code.