AMDGPU: SIDebuggerInsertNops preserves CFG

This saves an additional run of the DominatorTree and
MachineLoopInfo

llvm-svn: 271444
This commit is contained in:
Matt Arsenault 2016-06-02 00:04:22 +00:00
parent fc9b621e7a
commit d7671dd7b8
2 changed files with 6 additions and 0 deletions

View File

@ -59,6 +59,7 @@ extern "C" void LLVMInitializeAMDGPUTarget() {
initializeSIInsertWaitsPass(*PR);
initializeSIWholeQuadModePass(*PR);
initializeSILowerControlFlowPass(*PR);
initializeSIDebuggerInsertNopsPass(*PR);
}
static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {

View File

@ -39,6 +39,11 @@ public:
SIDebuggerInsertNops() : MachineFunctionPass(ID) { }
const char *getPassName() const override { return PASS_NAME; }
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();
MachineFunctionPass::getAnalysisUsage(AU);
}
bool runOnMachineFunction(MachineFunction &MF) override;
};