[PATCH] D20848: AMDGPU: SIDebuggerInsertNops preserves CFG
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue May 31 20:34:02 PDT 2016
arsenm created this revision.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: kzhuravl, arsenm.
This saves an additional run of the DominatorTree and MachineLoopInfo
http://reviews.llvm.org/D20848
Files:
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
lib/Target/AMDGPU/SIDebuggerInsertNops.cpp
Index: lib/Target/AMDGPU/SIDebuggerInsertNops.cpp
===================================================================
--- lib/Target/AMDGPU/SIDebuggerInsertNops.cpp
+++ lib/Target/AMDGPU/SIDebuggerInsertNops.cpp
@@ -39,6 +39,11 @@
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;
};
Index: lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -59,6 +59,7 @@
initializeSIInsertWaitsPass(*PR);
initializeSIWholeQuadModePass(*PR);
initializeSILowerControlFlowPass(*PR);
+ initializeSIDebuggerInsertNopsPass(*PR);
}
static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20848.59169.patch
Type: text/x-patch
Size: 1039 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160601/57e08948/attachment.bin>
More information about the llvm-commits
mailing list