diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/ProcessImplicitDefs.cpp')
-rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/ProcessImplicitDefs.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/ProcessImplicitDefs.cpp b/contrib/llvm-project/llvm/lib/CodeGen/ProcessImplicitDefs.cpp index d232ca3a69c3..7327f9e52efc 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/ProcessImplicitDefs.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/ProcessImplicitDefs.cpp @@ -11,10 +11,11 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" #include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/TargetInstrInfo.h" #include "llvm/CodeGen/TargetSubtargetInfo.h" #include "llvm/InitializePasses.h" +#include "llvm/Pass.h" +#include "llvm/PassRegistry.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" @@ -45,6 +46,11 @@ public: void getAnalysisUsage(AnalysisUsage &au) const override; bool runOnMachineFunction(MachineFunction &MF) override; + + virtual MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set( + MachineFunctionProperties::Property::IsSSA); + } }; } // end anonymous namespace @@ -124,7 +130,7 @@ void ProcessImplicitDefs::processImplicitDef(MachineInstr *MI) { // Using instr wasn't found, it could be in another block. // Leave the physreg IMPLICIT_DEF, but trim any extra operands. for (unsigned i = MI->getNumOperands() - 1; i; --i) - MI->RemoveOperand(i); + MI->removeOperand(i); LLVM_DEBUG(dbgs() << "Keeping physreg: " << *MI); } @@ -140,7 +146,6 @@ bool ProcessImplicitDefs::runOnMachineFunction(MachineFunction &MF) { TII = MF.getSubtarget().getInstrInfo(); TRI = MF.getSubtarget().getRegisterInfo(); MRI = &MF.getRegInfo(); - assert(MRI->isSSA() && "ProcessImplicitDefs only works on SSA form."); assert(WorkList.empty() && "Inconsistent worklist state"); for (MachineBasicBlock &MBB : MF) { |