[PATCH] D14147: Hanlding of aligned allocas on a target that does not align stack pointer.

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 11 10:40:27 PST 2015


hfinkel added a subscriber: hfinkel.
hfinkel added a comment.

> SystemZ maintains normal SP alignment always, and instead dynamically realigns stack objects when needed.


Before we get into the details, please explain this statement. Why can you not implement dynamic stack realignment using a base pointer like other targets?


================
Comment at: lib/CodeGen/MachineFunction.cpp:515
@@ -515,1 +514,3 @@
+                                           unsigned StackAlign,
+                                           bool ShouldWarn) {
   if (!ShouldClamp || Align <= StackAlign)
----------------
You've added this extra parameter and made a number of other changes just to produce a debug message. Please don't do that. Either make this a member function so it can compute the necessary condition itself, or remove this completely.

================
Comment at: lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp:117
@@ -108,1 +116,3 @@
+        if (AI->isStaticAlloca() && 
+	    (TFI->isStackRealignable() || (Align <= StackAlign))) {
           const ConstantInt *CUI = cast<ConstantInt>(AI->getArraySize());
----------------
Indentation looks odd here.


http://reviews.llvm.org/D14147





More information about the llvm-commits mailing list