[PATCH] D27688: [framelowering] Skip dbg values when getting next/previous instruction.

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 2 06:07:54 PST 2017


MatzeB accepted this revision.
MatzeB added a comment.

LGTM with nitpicks.



================
Comment at: lib/Target/X86/X86FrameLowering.cpp:2583-2584
 
+// This functions returns the next instruction after I, even if that is a
+// debug value, because the caller handles debug values.
 MachineBasicBlock::iterator X86FrameLowering::
----------------
This feels out of place in front of the function. (We should always have `///` doxygen in front of the function, as this just describes just a small detail I would rather it next to the `return`. Though I find the call of whether to comment or not already close as the information is already given in the docu comment of TargetFrameLowering::eliminateCallFramePseudoInstr().


================
Comment at: lib/Target/X86/X86FrameLowering.cpp:2595
   I = MBB.erase(I);
+  auto NextNonDebugI = skipDebugInstructionsForward(I, MBB.end());
 
----------------
How about `InsertPos` as a name?


https://reviews.llvm.org/D27688





More information about the llvm-commits mailing list