[PATCH] D34337: [PPC] Fix two bugs in frame lowering.
Tony Jiang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 6 12:58:54 PDT 2017
jtony added inline comments.
================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:1877
+ // the alignment size ( n = 16 here) and y is the size after aligning.
+ LowerBound &= ~(15);
----------------
nemanjai wrote:
> How are we testing this change?
I added one new test cases to test the alignment calculation change.
================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:457
+
+ bool FitsInRedZone = FitsInRedZonePPC32 || FitsInRedZonePPC64;
+
----------------
inouehrs wrote:
> How about adding a function `Subtarget.getAvailableRedZoneSize()`, which returns 288 only when icPPC64 && isSVR4ABI and 224 otherwise?
I understand why you want to add that function, but if you look at the logic (!Subtarget.isPPC64()) && (FrameSize == 0) can not nicely fit into that refactor. If everything can be fit into the getAvailableRedZoneSize() function and we just use
bool FitsInRedZone = FrameSize <= Subtarget.getAvailableRedZoneSize(), the refactoring you mentioned would be more useful.
https://reviews.llvm.org/D34337
More information about the llvm-commits
mailing list