[PATCH] D20081: [AMDGPU] Only allow register reservation for debugger usage with -g and -O0 + minor renaming
Konstantin Zhuravlyov via llvm-commits
llvm-commits at lists.llvm.org
Wed May 11 12:48:50 PDT 2016
kzhuravl added inline comments.
================
Comment at: lib/Target/AMDGPU/SIMachineFunctionInfo.cpp:140-143
@@ +139,6 @@
+ if (ST.debuggerReserveRegs()) {
+ if (!MF.getMMI().hasDebugInfo())
+ report_fatal_error("amdgpu-debugger-reserve-regs only allowed with -g");
+ if (TM.getOptLevel() != CodeGenOpt::None)
+ report_fatal_error("amdgpu-debugger-reserve-regs only allowed with -O0");
+
----------------
arsenm wrote:
> I don't see why this would be an error, particularly a backend error. Talking about -g here doesn't make sense
We want to restrict additional debugger features (register reservation, nops insertion, etc.) to be only used with debug info present and -O0 opt level.
I can change the error message to say "only allowed with debug info present".
Should we use assert instead? What are your thoughts?
http://reviews.llvm.org/D20081
More information about the llvm-commits
mailing list