[AMDGPU] Add insert nops pass based on subtarget features instead of cl::opt
Also,
- Skip pass if machine module does not have debug info
- Minor comment changes
- Added test
Differential Revision: http://reviews.llvm.org/D19079
llvm-svn: 266626
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
index 7ae0078..645559e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
@@ -95,6 +95,7 @@
int LDSBankCount;
unsigned IsaVersion;
bool EnableSIScheduler;
+ bool DebuggerInsertNops;
std::unique_ptr<AMDGPUFrameLowering> FrameLowering;
std::unique_ptr<AMDGPUTargetLowering> TLInfo;
@@ -304,6 +305,10 @@
return EnableSIScheduler;
}
+ bool debuggerInsertNops() const {
+ return DebuggerInsertNops;
+ }
+
bool dumpCode() const {
return DumpCode;
}