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

Issue 1438773004: Subzero. ARM32. Improve constant lowering. (Closed)

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

Patch Set 1 #

Patch Set 2 : Revert Makefile.standalone #

Patch Set 3 : Pre-shifts i8 and i16 constants when lowering icmp. #

Patch Set 4 : Folds constants in icmp. #

Patch Set 5 : Folds FP constants in vmov and vcmp. #

Patch Set 6 : Fixes lit, make format, git pull. #

Patch Set 7 : Fixes the lit tests. Double is too precise. #

Total comments: 15

Patch Set 8 : Handles comments; fixes make MINIMAL=1 #

Patch Set 9 : Refactors the code. #

Patch Set 10 : git pull #

Total comments: 12

Patch Set 11 : addresses comments. git pull. #

Patch Set 12 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1517 lines, -735 lines) Patch
M src/IceInstARM32.h View 1 2 3 4 5 6 7 8 9 11 chunks +70 lines, -1 line 0 comments Download
M src/IceInstARM32.cpp View 1 2 3 4 5 6 7 8 9 10 8 chunks +153 lines, -2 lines 0 comments Download
M src/IceTargetLoweringARM32.h View 1 2 3 4 5 6 7 8 9 10 8 chunks +57 lines, -12 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 1 2 3 4 5 6 7 8 9 10 12 chunks +915 lines, -394 lines 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +2 lines, -13 lines 0 comments Download
M src/IceUtils.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/64bit.pnacl.ll View 1 2 3 4 5 1 chunk +6 lines, -6 lines 0 comments Download
M tests_lit/llvm2ice_tests/arith.ll View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/bool-folding.ll View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M tests_lit/llvm2ice_tests/fp.arm.call.ll View 1 2 3 4 5 5 chunks +303 lines, -303 lines 0 comments Download
M tests_lit/llvm2ice_tests/unreachable.ll View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (1 generated)
John
5 years, 1 month ago (2015-11-12 22:40:28 UTC) #2
sehr
A few comments. Still working on this. https://codereview.chromium.org/1438773004/diff/120001/src/IceInstARM32.cpp File src/IceInstARM32.cpp (right): https://codereview.chromium.org/1438773004/diff/120001/src/IceInstARM32.cpp#newcode299 src/IceInstARM32.cpp:299: static constexpr ...
5 years, 1 month ago (2015-11-13 21:56:29 UTC) #3
John
https://codereview.chromium.org/1438773004/diff/120001/src/IceTargetLoweringARM32.cpp File src/IceTargetLoweringARM32.cpp (right): https://codereview.chromium.org/1438773004/diff/120001/src/IceTargetLoweringARM32.cpp#newcode2705 src/IceTargetLoweringARM32.cpp:2705: On 2015/11/13 21:56:29, sehr (please use this account) wrote: ...
5 years, 1 month ago (2015-11-13 22:00:41 UTC) #4
John
I am working on folding constants on every integer instruction, but here are the responses ...
5 years, 1 month ago (2015-11-14 00:00:38 UTC) #5
Jim Stichnoth
lgtm https://codereview.chromium.org/1438773004/diff/120001/src/IceTargetLoweringARM32.cpp File src/IceTargetLoweringARM32.cpp (right): https://codereview.chromium.org/1438773004/diff/120001/src/IceTargetLoweringARM32.cpp#newcode1467 src/IceTargetLoweringARM32.cpp:1467: // Src0Hi is not always used got Shl, ...
5 years, 1 month ago (2015-11-16 13:56:10 UTC) #6
John
please take another look. quite a lot changed.
5 years, 1 month ago (2015-11-16 18:57:36 UTC) #7
Jim Stichnoth
https://codereview.chromium.org/1438773004/diff/120001/src/IceInstARM32.h File src/IceInstARM32.h (right): https://codereview.chromium.org/1438773004/diff/120001/src/IceInstARM32.h#newcode224 src/IceInstARM32.h:224: using OperandARM32::dump; On 2015/11/14 00:00:38, John wrote: > On ...
5 years, 1 month ago (2015-11-16 23:06:26 UTC) #8
Jim Stichnoth
https://codereview.chromium.org/1438773004/diff/180001/src/IceUtils.h File src/IceUtils.h (right): https://codereview.chromium.org/1438773004/diff/180001/src/IceUtils.h#newcode126 src/IceUtils.h:126: return Val == 0 && !signbit(Val); std::signbit
5 years, 1 month ago (2015-11-17 04:00:36 UTC) #9
John
Committed patchset #12 (id:220001) manually as ccea793fe4259ba9aa0b6bcd3f281a5c08ac2aa4 (presubmit successful).
5 years, 1 month ago (2015-11-17 12:58:41 UTC) #10
John
5 years, 1 month ago (2015-11-17 22:17:05 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/1438773004/diff/180001/src/IceTargetLoweringA...
File src/IceTargetLoweringARM32.cpp (right):

https://codereview.chromium.org/1438773004/diff/180001/src/IceTargetLoweringA...
src/IceTargetLoweringARM32.cpp:1406: // It holds the two operantion's sources,
and maintains some state as to whether
On 2015/11/16 23:06:26, stichnot wrote:
> operations'

well, this is

the two sources of the operation

not

the sources of the two operations

This is now "it holds the two source operands."

https://codereview.chromium.org/1438773004/diff/180001/src/IceTargetLoweringA...
src/IceTargetLoweringARM32.cpp:1411: // The class is split in a base class with
operand type-independent methods, and
On 2015/11/16 23:06:26, stichnot wrote:
> split into ?

Done.

https://codereview.chromium.org/1438773004/diff/180001/src/IceTargetLoweringA...
src/IceTargetLoweringARM32.cpp:1419: // NumericOperands<ConstantInt32> also
exposes helper methods for emiting
On 2015/11/16 23:06:26, stichnot wrote:
> emitting

Done.

https://codereview.chromium.org/1438773004/diff/180001/src/IceTargetLoweringA...
src/IceTargetLoweringARM32.cpp:1630: _adds(T_Lo, SrcsLo.src0R(this),
SrcsLo.src1RF(this));
On 2015/11/16 23:06:26, stichnot wrote:
> Don't do this.  src0R() and src1RF() have side effects whose order is
undefined.
>  The lowering could be different across different C++ compilers, and this
could
> affect register allocation.

doh... done.

https://codereview.chromium.org/1438773004/diff/180001/src/IceTargetLoweringA...
src/IceTargetLoweringARM32.cpp:1776: Operand *_32 =
legalize(Ctx->getConstantInt32(32), Legal_Reg | Legal_Flex);
On 2015/11/16 23:06:26, stichnot wrote:
> Maybe this should be named _32RF?

I'd rather not. This is the number 32, not something that might end up in a
register. It is a flex operand because arm does not have immediates*, it has
flexible immediates**

I could rename this _32F, but then I would be confused about this being 32.0.
I'll leave _32.

*except for mov/movt/call
**which are awesome.

https://codereview.chromium.org/1438773004/diff/180001/src/IceUtils.h
File src/IceUtils.h (right):

https://codereview.chromium.org/1438773004/diff/180001/src/IceUtils.h#newcode126
src/IceUtils.h:126: return Val == 0 && !signbit(Val);
On 2015/11/17 04:00:36, stichnot wrote:
> std::signbit

Done.

Powered by Google App Engine
This is Rietveld 408576698