[PATCH] [PATCH 2/2] [x86] Add support for "probe-stack"

David Majnemer david.majnemer at gmail.com
Mon May 11 18:54:59 PDT 2015


================
Comment at: include/llvm/CodeGen/MachineFunction.h:281
@@ -280,1 +280,3 @@
 
+  /// Should we be probing the stack for the function.
+  /// Probing the stack means that we must read or write to the stack on every
----------------
I think this part should be '\brief'

================
Comment at: include/llvm/CodeGen/MachineFunction.h:282-285
@@ +281,6 @@
+  /// Should we be probing the stack for the function.
+  /// Probing the stack means that we must read or write to the stack on every
+  /// page. This is to ensure that a guard page will be hit and stack overflow
+  /// can be detected. We insert instructions to do this when allocating from
+  /// the stack.
+  bool shouldProbeStack() const;
----------------
This bit should just be with the definition as per the coding standard: http://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments

================
Comment at: lib/Target/X86/X86FrameLowering.cpp:421-422
@@ +420,4 @@
+      Symbol = "_alloca";
+    else
+      Symbol = "_chkstk";
+  } else {
----------------
Please place braces around this `else`

================
Comment at: lib/Target/X86/X86FrameLowering.cpp:850-851
@@ -837,4 +849,4 @@
     } else {
       // Allocate NumBytes-4 bytes on stack in case of isEAXAlive.
       // We'll also use 4 already allocated bytes for EAX.
       BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EAX)
----------------
This comment should probably be with the `NumBytesAdj` bit above.  Please update the `-4` bit as well.

http://reviews.llvm.org/D9654

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list