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

Issue 14569012: PNaCl ABI: Promote illegal integer types (Closed)

Created:
7 years, 7 months ago by Derek Schuff
Modified:
7 years, 7 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
http://git.chromium.org/native_client/pnacl-llvm.git@master
Visibility:
Public.

Description

PNaCl ABI: Promote illegal integer types This pass (mostly) legalizes integer types by promoting them. It has some limitations (e.g. it can't change function types) but it is more than sufficient for what clang and SROA generate. A more significant limitation of promotion is that packed bitfields of size > 64 bits are still not handled. There are none in our tests (other than callingconv_case_by_case which doesn't require a stable pexe) but we will want to either handle them by correctly expanding them, or find a better way to error out. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360 R=eliben@chromium.org, jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-llvm.git;a=commit;h=a0efa09

Patch Set 1 #

Patch Set 2 : use upper-clear invariant rather than sign-extend #

Total comments: 79

Patch Set 3 : #

Patch Set 4 : move logic to convertInstruction #

Total comments: 36

Patch Set 5 : #

Patch Set 6 : handle nsw/nuw #

Total comments: 6

Patch Set 7 : reviews #

Patch Set 8 : remove ABI checker tests until after we enable the pass #

Unified diffs Side-by-side diffs Delta from patch set Stats (+958 lines, -0 lines) Patch
M include/llvm/InitializePasses.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M include/llvm/Transforms/NaCl.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M lib/Transforms/NaCl/CMakeLists.txt View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A lib/Transforms/NaCl/PromoteIntegers.cpp View 1 2 3 4 5 6 1 chunk +613 lines, -0 lines 0 comments Download
A test/Transforms/NaCl/promote-integers.ll View 1 2 3 4 5 6 1 chunk +341 lines, -0 lines 0 comments Download
M tools/opt/opt.cpp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Derek Schuff
7 years, 7 months ago (2013-05-04 00:03:31 UTC) #1
Mark Seaborn
Some initial comments... https://codereview.chromium.org/14569012/diff/2001/lib/Analysis/NaCl/PNaClABITypeChecker.cpp File lib/Analysis/NaCl/PNaClABITypeChecker.cpp (right): https://codereview.chromium.org/14569012/diff/2001/lib/Analysis/NaCl/PNaClABITypeChecker.cpp#newcode56 lib/Analysis/NaCl/PNaClABITypeChecker.cpp:56: //Valid = true; You'll need to ...
7 years, 7 months ago (2013-05-06 17:04:06 UTC) #2
eliben
https://codereview.chromium.org/14569012/diff/2001/lib/Transforms/NaCl/PromoteIntegers.cpp File lib/Transforms/NaCl/PromoteIntegers.cpp (right): https://codereview.chromium.org/14569012/diff/2001/lib/Transforms/NaCl/PromoteIntegers.cpp#newcode1 lib/Transforms/NaCl/PromoteIntegers.cpp:1: //===- PromoteIntegers.cpp - ---------------------------------------------===// IMHO the name "PromoteIntegers" is ...
7 years, 7 months ago (2013-05-06 21:58:40 UTC) #3
jvoung (off chromium)
https://codereview.chromium.org/14569012/diff/2001/test/Transforms/NaCl/promote-integers.ll File test/Transforms/NaCl/promote-integers.ll (right): https://codereview.chromium.org/14569012/diff/2001/test/Transforms/NaCl/promote-integers.ll#newcode16 test/Transforms/NaCl/promote-integers.ll:16: %a12 = sext i8 %a to i12 move the ...
7 years, 7 months ago (2013-05-07 01:22:11 UTC) #4
Derek Schuff
https://codereview.chromium.org/14569012/diff/2001/lib/Transforms/NaCl/PromoteIntegers.cpp File lib/Transforms/NaCl/PromoteIntegers.cpp (right): https://codereview.chromium.org/14569012/diff/2001/lib/Transforms/NaCl/PromoteIntegers.cpp#newcode1 lib/Transforms/NaCl/PromoteIntegers.cpp:1: //===- PromoteIntegers.cpp - ---------------------------------------------===// On 2013/05/06 17:04:06, Mark Seaborn ...
7 years, 7 months ago (2013-05-08 22:33:28 UTC) #5
Derek Schuff
https://codereview.chromium.org/14569012/diff/2001/lib/Transforms/NaCl/PromoteIntegers.cpp File lib/Transforms/NaCl/PromoteIntegers.cpp (right): https://codereview.chromium.org/14569012/diff/2001/lib/Transforms/NaCl/PromoteIntegers.cpp#newcode96 lib/Transforms/NaCl/PromoteIntegers.cpp:96: class ConversionState { On 2013/05/06 21:58:40, eliben wrote: > ...
7 years, 7 months ago (2013-05-08 22:48:32 UTC) #6
jvoung (off chromium)
https://codereview.chromium.org/14569012/diff/2001/test/Transforms/NaCl/promote-integers.ll File test/Transforms/NaCl/promote-integers.ll (right): https://codereview.chromium.org/14569012/diff/2001/test/Transforms/NaCl/promote-integers.ll#newcode76 test/Transforms/NaCl/promote-integers.ll:76: ; CHECK: %a16 = trunc i32 %a24 to i16 ...
7 years, 7 months ago (2013-05-09 00:06:43 UTC) #7
Mark Seaborn
https://codereview.chromium.org/14569012/diff/2001/lib/Transforms/NaCl/PromoteIntegers.cpp File lib/Transforms/NaCl/PromoteIntegers.cpp (right): https://codereview.chromium.org/14569012/diff/2001/lib/Transforms/NaCl/PromoteIntegers.cpp#newcode44 lib/Transforms/NaCl/PromoteIntegers.cpp:44: static bool isLegalSize(unsigned Size) { On 2013/05/08 22:33:28, Derek ...
7 years, 7 months ago (2013-05-09 01:00:21 UTC) #8
eliben
LGTM from me otherwise https://codereview.chromium.org/14569012/diff/2001/lib/Transforms/NaCl/PromoteIntegers.cpp File lib/Transforms/NaCl/PromoteIntegers.cpp (right): https://codereview.chromium.org/14569012/diff/2001/lib/Transforms/NaCl/PromoteIntegers.cpp#newcode98 lib/Transforms/NaCl/PromoteIntegers.cpp:98: // Return the promoted value ...
7 years, 7 months ago (2013-05-09 16:42:19 UTC) #9
Derek Schuff
https://codereview.chromium.org/14569012/diff/16001/lib/Transforms/NaCl/PromoteIntegers.cpp File lib/Transforms/NaCl/PromoteIntegers.cpp (right): https://codereview.chromium.org/14569012/diff/16001/lib/Transforms/NaCl/PromoteIntegers.cpp#newcode8 lib/Transforms/NaCl/PromoteIntegers.cpp:8: // A limited set of transformations to promote illegal-sized ...
7 years, 7 months ago (2013-05-09 18:30:24 UTC) #10
Mark Seaborn
https://codereview.chromium.org/14569012/diff/16001/lib/Transforms/NaCl/PromoteIntegers.cpp File lib/Transforms/NaCl/PromoteIntegers.cpp (right): https://codereview.chromium.org/14569012/diff/16001/lib/Transforms/NaCl/PromoteIntegers.cpp#newcode12 lib/Transforms/NaCl/PromoteIntegers.cpp:12: // It always maintains the invariant that the upper ...
7 years, 7 months ago (2013-05-09 19:27:48 UTC) #11
Derek Schuff
also added nsw/nuw handling https://codereview.chromium.org/14569012/diff/16001/lib/Transforms/NaCl/PromoteIntegers.cpp File lib/Transforms/NaCl/PromoteIntegers.cpp (right): https://codereview.chromium.org/14569012/diff/16001/lib/Transforms/NaCl/PromoteIntegers.cpp#newcode12 lib/Transforms/NaCl/PromoteIntegers.cpp:12: // It always maintains the ...
7 years, 7 months ago (2013-05-09 20:19:43 UTC) #12
jvoung (off chromium)
LGTM https://codereview.chromium.org/14569012/diff/34002/lib/Transforms/NaCl/PromoteIntegers.cpp File lib/Transforms/NaCl/PromoteIntegers.cpp (right): https://codereview.chromium.org/14569012/diff/34002/lib/Transforms/NaCl/PromoteIntegers.cpp#newcode485 lib/Transforms/NaCl/PromoteIntegers.cpp:485: NewInst ? NewInst : State.getConverted(Binop->getOperand(0)), NewInst is always ...
7 years, 7 months ago (2013-05-10 01:22:43 UTC) #13
Derek Schuff
https://codereview.chromium.org/14569012/diff/34002/lib/Transforms/NaCl/PromoteIntegers.cpp File lib/Transforms/NaCl/PromoteIntegers.cpp (right): https://codereview.chromium.org/14569012/diff/34002/lib/Transforms/NaCl/PromoteIntegers.cpp#newcode485 lib/Transforms/NaCl/PromoteIntegers.cpp:485: NewInst ? NewInst : State.getConverted(Binop->getOperand(0)), On 2013/05/10 01:22:44, jvoung ...
7 years, 7 months ago (2013-05-11 00:11:45 UTC) #14
Derek Schuff
7 years, 7 months ago (2013-05-11 00:11:52 UTC) #15
Message was sent while issue was closed.
Committed patchset #8 manually as ra0efa09 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698