[PATCH] D12208: [Sparc] Support user-specified stack object overalignment.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 13:28:57 PDT 2015


chandlerc added inline comments.

================
Comment at: lib/Target/Sparc/SparcFrameLowering.cpp:99
@@ +98,3 @@
+
+  // TODO: unfortunately, returning false from canRealignStack
+  // actually just causes needsStackRealignment to return false,
----------------
We usually mark these as 'FIXME'.

================
Comment at: lib/Target/Sparc/SparcFrameLowering.cpp:104
@@ +103,3 @@
+
+  // For now, just see if it's lied, and report an error here.
+  if (!NeedsStackRealignment && MFI->getMaxAlignment() > getStackAlignment())
----------------
I would keep this in a single comment block as otherwise it doesn't really make sense.

================
Comment at: lib/Target/Sparc/SparcFrameLowering.cpp:222-228
@@ +221,9 @@
+
+  // Addressable stack objects are accessed using neg. offsets from
+  // %fp, or positive offsets from %sp.
+
+
+  // Sparc uses FP-based references in general, even when "hasFP" is
+  // false. That function is rather a misnomer, because %fp is
+  // actually always available, unless isLeafProc.
+  bool UseFP;
----------------
You have two comment blocks here. The first one makes sense attached to the 'bool' variable. The second one would make much more sense attached to the if chain below.

================
Comment at: lib/Target/Sparc/SparcRegisterInfo.cpp:181
@@ -188,1 +180,3 @@
+
+  Offset += MI.getOperand(FIOperandNum + 1).getImm(); // WTF is this about??
 
----------------
Not suer this comment is helpful. ;]


http://reviews.llvm.org/D12208





More information about the llvm-commits mailing list