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

Issue 1411583007: Combine allocas (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

Combine allocas Partition allocas that occur in the entry block into two categories. The first is those whose size is fixed and alignment are less than or equal to the stack alignment. These are emitted relative to a pointer, either in increasing offset relative to the stack pointer or decreasing offset relative to the frame pointer. (Actually, we are not enabling this optimization for frame pointer frames yet) The second category is allocas whose size is dynamic or alignment is creater than the stack alignment. These are emitted relative to a user variable in increasing offset order. This optimization is only enabled for x86 at O2. BUG= R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=4318a410939b5cee89736f6f15a3185e385b5dc7

Patch Set 1 #

Patch Set 2 : Move frame pointer alloca to the top of the returned region #

Patch Set 3 : Add a test #

Patch Set 4 : Increment correct partitioning. #

Patch Set 5 : Add rematerialization #

Patch Set 6 : Update tests to use rematerialization #

Patch Set 7 : Fake definitions and uses for stack pointer relative accesses #

Patch Set 8 : Add test that leas get offset from outgoing args #

Patch Set 9 : Factored to only be enabled for x86 at O2. #

Patch Set 10 : Cleanups, removed ARM vestiges. #

Patch Set 11 : Fix a typo. #

Total comments: 40

Patch Set 12 : Code review fixes #

Patch Set 13 : Merge fast alloca pass into processAllocas #

Patch Set 14 : Finish fast path. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+563 lines, -171 lines) Patch
M src/IceCfg.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +13 lines, -4 lines 0 comments Download
M src/IceCfg.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +137 lines, -45 lines 0 comments Download
M src/IceInstX8632.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +73 lines, -31 lines 0 comments Download
M src/IceInstX8664.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -1 line 0 comments Download
M src/IceInstX86BaseImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 57 chunks +111 lines, -71 lines 0 comments Download
M src/IceOperand.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -0 lines 0 comments Download
M src/IceTLS.h View 1 2 3 4 5 6 7 8 10 11 2 chunks +0 lines, -2 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +10 lines, -0 lines 0 comments Download
M src/IceTargetLoweringMIPS32.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +10 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -2 lines 0 comments Download
M src/IceTargetLoweringX8632Traits.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +10 lines, -1 line 0 comments Download
M src/IceTargetLoweringX8664Traits.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +10 lines, -1 line 0 comments Download
M src/IceTargetLoweringX86Base.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +35 lines, -9 lines 0 comments Download
A tests_lit/llvm2ice_tests/fused-alloca.ll View 1 2 3 4 5 6 7 8 9 1 chunk +57 lines, -0 lines 0 comments Download
A tests_lit/llvm2ice_tests/fused-alloca-arg.ll View 1 2 3 4 5 6 7 8 9 1 chunk +73 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/nacl-atomic-fence-all.ll View 1 2 3 4 5 3 chunks +0 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
sehr
OK, after lots of pointers/help from Jim, we finally got this in shape that passes ...
5 years, 1 month ago (2015-11-11 00:52:00 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/1411583007/diff/200001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1411583007/diff/200001/src/IceCfg.cpp#newcode209 src/IceCfg.cpp:209: // pointer, saving a stack slot and a load ...
5 years, 1 month ago (2015-11-11 17:39:45 UTC) #4
Jim Stichnoth
https://codereview.chromium.org/1411583007/diff/200001/src/IceCfg.h File src/IceCfg.h (right): https://codereview.chromium.org/1411583007/diff/200001/src/IceCfg.h#newcode189 src/IceCfg.h:189: enum AllocaBaseVariableType { StackPointer, FramePointer, UserPointer }; Consider adding ...
5 years, 1 month ago (2015-11-11 17:47:16 UTC) #5
sehr
Thanks for the review. PTAL. https://codereview.chromium.org/1411583007/diff/200001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/1411583007/diff/200001/src/IceCfg.cpp#newcode209 src/IceCfg.cpp:209: // pointer, saving a ...
5 years, 1 month ago (2015-11-11 22:14:11 UTC) #6
Jim Stichnoth
lgtm
5 years, 1 month ago (2015-11-11 22:45:53 UTC) #7
sehr
5 years, 1 month ago (2015-11-11 23:01:59 UTC) #8
Message was sent while issue was closed.
Committed patchset #14 (id:260001) manually as
4318a410939b5cee89736f6f15a3185e385b5dc7 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698