From 1fdf02ad5a4ca155017eea22688365a20aab077c Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Thu, 22 May 2025 08:07:52 -0700 Subject: [LLVM][CodeGen] Add convenience accessors for MachineFunctionProperties (#140002) Add per-property has/set/reset functions to MachineFunctionProperties. --- llvm/lib/CodeGen/MachineOutliner.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp') 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. -- cgit v1.1