[PATCH] Generate DWARF stack frame information for ARM/Thumb functions [2nd attempt].

Renato Golin renato.golin at linaro.org
Sun Feb 9 11:42:11 PST 2014


  Hi Saleem,

  I have two comments, but mostly, I agree with your remarks.

  cheers,
  --renato


================
Comment at: lib/CodeGen/AsmPrinter/ARMException.cpp:66
@@ +65,3 @@
+  AsmPrinter::CFIMoveType MoveType = Asm->needsCFIMoves();
+  assert (MoveType != AsmPrinter::CFI_M_EH);
+  if (MoveType == AsmPrinter::CFI_M_Debug) {
----------------
Saleem Abdulrasool wrote:
> no space after the assert, and add a message please.
> 
>     assert(MoveType != AsmPrinter::CFI_M_EH &&
>            "non-EH CFI move in prologue");
> 
> Although, Im not sure I fully understand this assertion.  Why is it impossible to encounter a debug CFI?  Or is it just that the lowering will always produce the ARM specific macros for the prologue setup?
EHABI lowering will use assembler directives rather than Dwarf EH, so you can't get that move type. I'll have to think how do we select from EH and Dwarf, but that's for another commit.

================
Comment at: lib/Target/ARM/ARMFrameLowering.cpp:446
@@ +445,3 @@
+          MMI.addFrameInst(MCCFIInstruction::createOffset(SPLabel,
+              MRI->getDwarfRegNum(Reg, true), MFI->getObjectOffset(FI)));
+      }
----------------
Saleem Abdulrasool wrote:
> This is not conformant to LLVM style.
Do you mean "default" first?


http://llvm-reviews.chandlerc.com/D2706



More information about the llvm-commits mailing list