[llvm] r271444 - AMDGPU: SIDebuggerInsertNops preserves CFG
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 1 17:04:22 PDT 2016
Author: arsenm
Date: Wed Jun 1 19:04:22 2016
New Revision: 271444
URL: http://llvm.org/viewvc/llvm-project?rev=271444&view=rev
Log:
AMDGPU: SIDebuggerInsertNops preserves CFG
This saves an additional run of the DominatorTree and
MachineLoopInfo
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/trunk/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp?rev=271444&r1=271443&r2=271444&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp Wed Jun 1 19:04:22 2016
@@ -59,6 +59,7 @@ extern "C" void LLVMInitializeAMDGPUTarg
initializeSIInsertWaitsPass(*PR);
initializeSIWholeQuadModePass(*PR);
initializeSILowerControlFlowPass(*PR);
+ initializeSIDebuggerInsertNopsPass(*PR);
}
static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
Modified: llvm/trunk/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp?rev=271444&r1=271443&r2=271444&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp Wed Jun 1 19:04:22 2016
@@ -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;
};
More information about the llvm-commits
mailing list