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

Issue 1472623002: Unify alloca, outgoing arg, and prolog construction (Closed)

Created:
5 years, 1 month ago by sehr
Modified:
5 years ago
Reviewers:
Jim Stichnoth, John
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

1) Move helper creation to separate method, which also computes the maximum outgoing argument size. The computed size is checked against call lowering's size. 2) Make addProlog use the outgoing argument size and remove the adjustments in lowerCall. 3) Remove AdjustStack instructions and friends. BUG= R=jpp@chromium.org, stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=26217e3333150e66fc96aca79c01105906797960

Patch Set 1 #

Patch Set 2 : Merge out arg size computation #

Patch Set 3 : All but gcc now work. #

Patch Set 4 : Fixed typo, missing subtraction on x64 #

Patch Set 5 : Fixed missing out args in subtraction. #

Total comments: 4

Patch Set 6 : Code review fixes. Also removed StackAdjustment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+460 lines, -451 lines) Patch
M src/IceAssemblerARM32.h View 1 2 3 4 5 1 chunk +3 lines, -7 lines 0 comments Download
M src/IceAssemblerARM32.cpp View 1 2 3 4 5 1 chunk +1 line, -4 lines 0 comments Download
M src/IceCfgNode.cpp View 1 2 3 4 5 4 chunks +3 lines, -7 lines 0 comments Download
M src/IceInstARM32.cpp View 1 2 3 4 5 2 chunks +0 lines, -2 lines 0 comments Download
M src/IceInstX8632.cpp View 1 2 3 4 5 6 chunks +9 lines, -18 lines 0 comments Download
M src/IceInstX8664.cpp View 1 2 3 4 5 2 chunks +2 lines, -4 lines 0 comments Download
M src/IceInstX86Base.h View 1 2 2 chunks +0 lines, -28 lines 0 comments Download
M src/IceInstX86BaseImpl.h View 1 2 2 chunks +0 lines, -48 lines 0 comments Download
M src/IceTargetLowering.h View 1 2 3 4 5 4 chunks +0 lines, -21 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 9 chunks +14 lines, -24 lines 0 comments Download
M src/IceTargetLoweringX8632Traits.h View 1 2 3 4 5 2 chunks +0 lines, -8 lines 0 comments Download
M src/IceTargetLoweringX8664.cpp View 1 2 3 4 5 8 chunks +34 lines, -21 lines 0 comments Download
M src/IceTargetLoweringX8664Traits.h View 1 2 3 4 5 2 chunks +0 lines, -8 lines 0 comments Download
M src/IceTargetLoweringX86Base.h View 1 2 3 4 4 chunks +11 lines, -6 lines 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 2 3 4 5 20 chunks +320 lines, -180 lines 0 comments Download
M tests_lit/assembler/x86/sandboxing.ll View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M tests_lit/llvm2ice_tests/64bit.pnacl.ll View 1 2 2 chunks +0 lines, -4 lines 0 comments Download
M tests_lit/llvm2ice_tests/align-spill-locations.ll View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M tests_lit/llvm2ice_tests/alloc.ll View 1 2 6 chunks +14 lines, -12 lines 0 comments Download
M tests_lit/llvm2ice_tests/commutativity.ll View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M tests_lit/llvm2ice_tests/ebp_args.ll View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M tests_lit/llvm2ice_tests/elf_function_sections.ll View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M tests_lit/llvm2ice_tests/elf_nodata.ll View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/fused-alloca.ll View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/fused-alloca-arg.ll View 1 2 4 chunks +8 lines, -12 lines 0 comments Download
M tests_lit/llvm2ice_tests/icmp-with-zero.ll View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M tests_lit/llvm2ice_tests/int-arg.ll View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll View 1 2 1 chunk +7 lines, -3 lines 0 comments Download
M tests_lit/llvm2ice_tests/vector-arg.ll View 1 2 6 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
sehr
Not happy with the naming of this function, but PTAL.
5 years ago (2015-11-24 21:33:44 UTC) #3
sehr
Never mind for now. Conflicted with jpp's CL. Will notify when ready.
5 years ago (2015-11-24 21:43:34 UTC) #4
John
lgtm
5 years ago (2015-11-24 22:25:48 UTC) #5
sehr
Presubmit now passes -- and we've gone the whole way to have fixed allocas and ...
5 years ago (2015-11-25 20:22:29 UTC) #7
Jim Stichnoth
LGTM. You may want to get rid of TargetLowering::StackAdjustment as well. I think you need ...
5 years ago (2015-11-26 18:32:06 UTC) #8
sehr
Committed patchset #6 (id:100001) manually as 26217e3333150e66fc96aca79c01105906797960 (presubmit successful).
5 years ago (2015-11-26 21:03:55 UTC) #10
sehr
5 years ago (2015-11-26 21:09:23 UTC) #11
Message was sent while issue was closed.
Thanks for the reviews.

https://codereview.chromium.org/1472623002/diff/80001/src/IceTargetLoweringX8...
File src/IceTargetLoweringX8632.cpp (right):

https://codereview.chromium.org/1472623002/diff/80001/src/IceTargetLoweringX8...
src/IceTargetLoweringX8632.cpp:506: if (!NeedsStackAlignment) {
On 2015/11/26 18:32:06, stichnot wrote:
> Instead of "if (!c) a; else b;", use "if (c) b; else a;".
> 
> Same for the x8664 file.

I did it to parallel ARM.  I fixed that also.

https://codereview.chromium.org/1472623002/diff/80001/src/IceTargetLoweringX8...
File src/IceTargetLoweringX86BaseImpl.h (right):

https://codereview.chromium.org/1472623002/diff/80001/src/IceTargetLoweringX8...
src/IceTargetLoweringX86BaseImpl.h:5499: if (ReturnType == IceType_void)
On 2015/11/26 18:32:06, stichnot wrote:
> This void test is redundant with the code below, can it be removed?

Removed.

Powered by Google App Engine
This is Rietveld 408576698