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

Issue 465413003: Subzero: Align spill locations to natural alignment. (Closed)

Created:
6 years, 4 months ago by wala
Modified:
6 years, 4 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

Subzero: Align spill locations to natural alignment. This requires sorting the spilled variables based on alignment and introducing additional padding around the spill location areas. These changes allow vector instructions to accept memory operands. Old stack frame layout: New stack frame layout: +---------------------+ +---------------------+ | return address | | return address | +---------------------+ +---------------------+ | preserved registers | | preserved registers | +---------------------+ +---------------------+ | global spill area | | padding | +---------------------+ +---------------------+ | local spill area | | global spill area | +---------------------+ +---------------------+ | padding | | padding | +---------------------+ +---------------------+ | local variables | | local spill area | +---------------------+ +---------------------+ | padding | +---------------------+ | local variables | +---------------------+ BUG=none R=jvoung@chromium.org, stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=d4799f4

Patch Set 1 #

Patch Set 2 : Don't sort everything. #

Total comments: 15

Patch Set 3 : Comments, round 1 #

Total comments: 1

Patch Set 4 : Fix padding calculation in debugging output. #

Patch Set 5 : Clarify bucket calculation. #

Total comments: 4

Patch Set 6 : Reserve some space in the destination vector prior to sorting. #

Patch Set 7 : LocalsSizeBytes -> SpillAreaSizeBytes, local variables -> allocas #

Unified diffs Side-by-side diffs Delta from patch set Stats (+304 lines, -131 lines) Patch
M src/IceTargetLowering.h View 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLoweringX8632.h View 1 2 3 4 5 6 3 chunks +4 lines, -2 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 6 32 chunks +209 lines, -128 lines 0 comments Download
A tests_lit/llvm2ice_tests/align-spill-locations.ll View 1 2 1 chunk +90 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
wala
This removes the ugly LEGAL_HACKs from the lowering code. Yay!!
6 years, 4 months ago (2014-08-13 23:22:01 UTC) #1
Jim Stichnoth
https://codereview.chromium.org/465413003/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/465413003/diff/20001/src/IceTargetLoweringX8632.cpp#newcode530 src/IceTargetLoweringX8632.cpp:530: typedef std::map<uint32_t, VarList> BucketMap; Use a list<> or vector<> ...
6 years, 4 months ago (2014-08-13 23:59:35 UTC) #2
jvoung (off chromium)
yay for removing LEGAL_HACKs! https://codereview.chromium.org/465413003/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/465413003/diff/20001/src/IceTargetLoweringX8632.cpp#newcode725 src/IceTargetLoweringX8632.cpp:725: LocalsSizeBytes += NewGlobalsSize - GlobalsSize; ...
6 years, 4 months ago (2014-08-14 00:48:49 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/465413003/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/465413003/diff/20001/src/IceTargetLoweringX8632.cpp#newcode530 src/IceTargetLoweringX8632.cpp:530: typedef std::map<uint32_t, VarList> BucketMap; On 2014/08/13 23:59:34, stichnot wrote: ...
6 years, 4 months ago (2014-08-14 16:48:29 UTC) #4
wala
https://codereview.chromium.org/465413003/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/465413003/diff/20001/src/IceTargetLoweringX8632.cpp#newcode530 src/IceTargetLoweringX8632.cpp:530: typedef std::map<uint32_t, VarList> BucketMap; On 2014/08/13 23:59:34, stichnot wrote: ...
6 years, 4 months ago (2014-08-14 17:31:24 UTC) #5
wala
https://codereview.chromium.org/465413003/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/465413003/diff/20001/src/IceTargetLoweringX8632.cpp#newcode530 src/IceTargetLoweringX8632.cpp:530: typedef std::map<uint32_t, VarList> BucketMap; On 2014/08/14 17:31:24, wala wrote: ...
6 years, 4 months ago (2014-08-14 17:51:59 UTC) #6
Jim Stichnoth
https://codereview.chromium.org/465413003/diff/40001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/465413003/diff/40001/src/IceTargetLoweringX8632.cpp#newcode27 src/IceTargetLoweringX8632.cpp:27: #include <strings.h> Use MathExtras.h and llvm::findFirstSet(), since JF says ...
6 years, 4 months ago (2014-08-14 18:21:19 UTC) #7
wala
https://codereview.chromium.org/465413003/diff/120001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/465413003/diff/120001/src/IceTargetLoweringX8632.cpp#newcode535 src/IceTargetLoweringX8632.cpp:535: void TargetX8632::sortByAlignment(VarList &Dest, const VarList &Source) const { On ...
6 years, 4 months ago (2014-08-14 18:24:11 UTC) #8
jvoung (off chromium)
https://codereview.chromium.org/465413003/diff/120001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/465413003/diff/120001/src/IceTargetLoweringX8632.cpp#newcode629 src/IceTargetLoweringX8632.cpp:629: // * LocalsSizeBytes: areas 3 - 7 There's a ...
6 years, 4 months ago (2014-08-14 18:40:59 UTC) #9
wala
https://codereview.chromium.org/465413003/diff/120001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/465413003/diff/120001/src/IceTargetLoweringX8632.cpp#newcode629 src/IceTargetLoweringX8632.cpp:629: // * LocalsSizeBytes: areas 3 - 7 On 2014/08/14 ...
6 years, 4 months ago (2014-08-14 19:47:01 UTC) #10
jvoung (off chromium)
lgtm
6 years, 4 months ago (2014-08-14 20:36:57 UTC) #11
Jim Stichnoth
Also LGTM
6 years, 4 months ago (2014-08-14 21:00:31 UTC) #12
wala
6 years, 4 months ago (2014-08-14 21:24:18 UTC) #13
Message was sent while issue was closed.
Committed patchset #7 manually as d4799f4 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698