[PATCH] D31953: Use methods to access data stored with frame instructions

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 10:44:49 PDT 2017


mkuper accepted this revision.
mkuper added a comment.
This revision is now accepted and ready to land.

LGTM, except for the comments.



================
Comment at: include/llvm/Target/TargetInstrInfo.h:170
+  /// freed by the caller.
+  /// Note, in some cases call frame or part of it is set up prior to the frame
+  /// setup instruction, it takes place for instance, in calls that involve
----------------
This sentence is somewhat broken.


================
Comment at: lib/Target/X86/X86InstrInfo.h:185
 
+  /// Returns the stack pointer adjustment made by this frame instruction.
+  int64_t getFrameAdjustment(const MachineInstr &I) const {
----------------
This doesn't sound right. IIRC, the second parameter is precisely the adjustment this instruction is *not* responsible for.
That is, the first parameter is "how much is the frame getting adjusted by, overall", and the second parameter is "how much of the adjustment happens inside the sequence" (e.g. by pushes, or inside the callee).


https://reviews.llvm.org/D31953





More information about the llvm-commits mailing list