Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Issue 1435363002: Merge fixed alloca stack adjustments into the prolog (Closed)

Created:
5 years, 1 month ago by sehr
Modified:
5 years, 1 month ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Merge fixed alloca stack adjustments into the prolog Also removes reliance on lowerAlloca entirely for the fixed allocations. BUG= R=jpp@chromium.org, stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=2f3b8ec812321b1549bc1714a239b9dd0c95ebd7

Patch Set 1 #

Patch Set 2 : Combined frames work in all four scenarios. #

Patch Set 3 : Add spuriously deleted line. #

Patch Set 4 : Fix rebase issues. #

Total comments: 33

Patch Set 5 : Code review updates #

Patch Set 6 : One more code review fix #

Total comments: 1

Patch Set 7 : Final code review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -107 lines) Patch
M src/IceCfg.cpp View 1 2 3 4 3 chunks +35 lines, -42 lines 0 comments Download
M src/IceConverter.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/IceInst.h View 1 2 3 4 2 chunks +5 lines, -5 lines 0 comments Download
M src/IceInst.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M src/IceInstX8632.cpp View 1 2 3 4 4 chunks +29 lines, -13 lines 0 comments Download
M src/IceOperand.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/IceOperand.cpp View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M src/IceTargetLowering.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 2 3 4 5 6 1 chunk +7 lines, -1 line 0 comments Download
M src/IceTargetLoweringARM32.h View 1 2 3 4 2 chunks +13 lines, -1 line 0 comments Download
M src/IceTargetLoweringMIPS32.h View 1 2 3 4 2 chunks +13 lines, -1 line 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 2 chunks +29 lines, -10 lines 0 comments Download
M src/IceTargetLoweringX86Base.h View 1 2 3 4 5 3 chunks +14 lines, -2 lines 0 comments Download
M src/PNaClTranslator.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/alloc.ll View 1 2 5 chunks +19 lines, -6 lines 0 comments Download
M tests_lit/llvm2ice_tests/fused-alloca.ll View 1 2 3 3 chunks +83 lines, -12 lines 0 comments Download
M tests_lit/llvm2ice_tests/fused-alloca-arg.ll View 2 chunks +4 lines, -8 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
sehr
Fixed allocas are now a part of the prolog. PTAL.
5 years, 1 month ago (2015-11-12 22:09:00 UTC) #3
sehr
REVIEWERS: Hold off on the review for now. In my fine tradition of strategic overreach, ...
5 years, 1 month ago (2015-11-12 23:30:59 UTC) #4
sehr
On 2015/11/12 23:30:59, sehr (please use this account) wrote: > REVIEWERS: Hold off on the ...
5 years, 1 month ago (2015-11-13 06:01:35 UTC) #5
sehr
On 2015/11/13 06:01:35, sehr (please use this account) wrote: > On 2015/11/12 23:30:59, sehr (please ...
5 years, 1 month ago (2015-11-16 06:18:04 UTC) #6
John
I'll let the official LGTM to Jim. LGTM https://codereview.chromium.org/1435363002/diff/60001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1435363002/diff/60001/src/IceCfg.cpp#newcode624 src/IceCfg.cpp:624: AllocaBaseVariableType ...
5 years, 1 month ago (2015-11-16 14:00:02 UTC) #7
Jim Stichnoth
https://codereview.chromium.org/1435363002/diff/60001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1435363002/diff/60001/src/IceCfg.cpp#newcode502 src/IceCfg.cpp:502: for (size_t i = 0; i < Allocas.size(); ++i) ...
5 years, 1 month ago (2015-11-16 14:47:58 UTC) #8
sehr
Thanks for the reviews. PTAL. https://codereview.chromium.org/1435363002/diff/60001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1435363002/diff/60001/src/IceCfg.cpp#newcode502 src/IceCfg.cpp:502: for (size_t i = ...
5 years, 1 month ago (2015-11-16 18:42:25 UTC) #9
Jim Stichnoth
lgtm https://codereview.chromium.org/1435363002/diff/60001/src/IceTargetLowering.cpp File src/IceTargetLowering.cpp (right): https://codereview.chromium.org/1435363002/diff/60001/src/IceTargetLowering.cpp#newcode366 src/IceTargetLowering.cpp:366: // Rematerializable uses of esp/ebp do not count ...
5 years, 1 month ago (2015-11-16 22:47:18 UTC) #10
sehr
Committed patchset #7 (id:120001) manually as 2f3b8ec812321b1549bc1714a239b9dd0c95ebd7 (tree was closed).
5 years, 1 month ago (2015-11-17 00:51:45 UTC) #11
sehr
5 years, 1 month ago (2015-11-17 01:00:00 UTC) #12
Message was sent while issue was closed.
On 2015/11/16 22:47:18, stichnot wrote:
> lgtm
> 
>
https://codereview.chromium.org/1435363002/diff/60001/src/IceTargetLowering.cpp
> File src/IceTargetLowering.cpp (right):
> 
>
https://codereview.chromium.org/1435363002/diff/60001/src/IceTargetLowering.c...
> src/IceTargetLowering.cpp:366: // Rematerializable uses of esp/ebp do not
count
> as uses for spilling.
> On 2015/11/16 18:42:24, sehr (please use this account) wrote:
> > On 2015/11/16 14:47:57, stichnot wrote:
> > > I don't understand what this change does.
> > > 
> > > The purpose of the Var->hasReg() check is to record the complete set of
> > physical
> > > registers used in the function, so that the prolog/epilog generation code
> can
> > > filter them against the set of callee-save registers to get the set of
> > registers
> > > to save/restore.  It doesn't seem like this conditional should have any
> effect
> > > on the outcome.  (But I haven't tried it, so I could be wrong...)
> > > 
> > > Also, it's better to say something like "stack/frame pointer" instead of
> > > "esp/ebp" in this target-neutral file.
> > 
> > Well, it doesn't work to remove it, as I discovered.  The issue is as
follows.
> 
> > This code keeps track of references to variables before (I think) register
> > allocating anything.  It's looking for physical register references to ebp
and
> > noting that those would cause ebp to need to be spilled and restored.  With
> > rematerialization I create uses of ebp that are to the binding established
> > within the call frame, not outside it, so I don't want the spilled version. 
> > Make sense?
> 
> I spent some quality time with the code to understand what breaks when the
> condition is removed.  In the end I agree that this is the right thing to do,
> but I would change the comment to something like:
> 
> Don't consider a rematerializable variable to be an actual register use
> (specifically of the frame pointer).  Otherwise, the prolog may decide to save
> the frame pointer twice - once because of the explicit need for a frame
pointer,
> and once because of an active use of a callee-save register.
> 
>
https://codereview.chromium.org/1435363002/diff/100001/src/IceTargetLowering.cpp
> File src/IceTargetLowering.cpp (right):
> 
>
https://codereview.chromium.org/1435363002/diff/100001/src/IceTargetLowering....
> src/IceTargetLowering.cpp:366: // Rematerializable uses of stack/frame do not
> count as uses for spilling.
> stack/frame pointer

Done.  Thanks.

Powered by Google App Engine
This is Rietveld 408576698