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

Issue 120773002: PNaCl: Implement computed gotos (indirectbr) by expanding out to switches (Closed)

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

Description

PNaCl: Implement computed gotos (indirectbr) by expanding out to switches Add the ExpandIndirectBr pass for expanding out indirectbr and blockaddress into switch instructions, so that programs using computed gotos can work with PNaCl's stable ABI. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3695 TEST=*.ll tests + GCC torture tests Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-llvm.git;a=commit;h=a55919f

Patch Set 1 #

Patch Set 2 : Cleanup #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -0 lines) Patch
M include/llvm/InitializePasses.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M include/llvm/Transforms/NaCl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M lib/Transforms/NaCl/CMakeLists.txt View 1 chunk +1 line, -0 lines 0 comments Download
A lib/Transforms/NaCl/ExpandIndirectBr.cpp View 1 chunk +152 lines, -0 lines 3 comments Download
M lib/Transforms/NaCl/PNaClABISimplify.cpp View 1 chunk +3 lines, -0 lines 0 comments Download
A test/Transforms/NaCl/expand-indirectbr.ll View 1 chunk +62 lines, -0 lines 0 comments Download
M tools/opt/opt.cpp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Mark Seaborn
6 years, 11 months ago (2014-01-06 19:54:58 UTC) #1
Derek Schuff
https://codereview.chromium.org/120773002/diff/60001/lib/Transforms/NaCl/ExpandIndirectBr.cpp File lib/Transforms/NaCl/ExpandIndirectBr.cpp (right): https://codereview.chromium.org/120773002/diff/60001/lib/Transforms/NaCl/ExpandIndirectBr.cpp#newcode128 lib/Transforms/NaCl/ExpandIndirectBr.cpp:128: // indirectbr, replace them with dummy values. Why do ...
6 years, 11 months ago (2014-01-06 22:30:22 UTC) #2
Mark Seaborn
https://codereview.chromium.org/120773002/diff/60001/lib/Transforms/NaCl/ExpandIndirectBr.cpp File lib/Transforms/NaCl/ExpandIndirectBr.cpp (right): https://codereview.chromium.org/120773002/diff/60001/lib/Transforms/NaCl/ExpandIndirectBr.cpp#newcode128 lib/Transforms/NaCl/ExpandIndirectBr.cpp:128: // indirectbr, replace them with dummy values. On 2014/01/06 ...
6 years, 11 months ago (2014-01-06 22:36:01 UTC) #3
Derek Schuff
lgtm https://codereview.chromium.org/120773002/diff/60001/lib/Transforms/NaCl/ExpandIndirectBr.cpp File lib/Transforms/NaCl/ExpandIndirectBr.cpp (right): https://codereview.chromium.org/120773002/diff/60001/lib/Transforms/NaCl/ExpandIndirectBr.cpp#newcode128 lib/Transforms/NaCl/ExpandIndirectBr.cpp:128: // indirectbr, replace them with dummy values. On ...
6 years, 11 months ago (2014-01-07 00:35:01 UTC) #4
Mark Seaborn
Committed patchset #2 manually as ra55919f (presubmit successful).
6 years, 11 months ago (2014-01-07 10:35:58 UTC) #5
Mark Seaborn
6 years, 11 months ago (2014-01-07 20:09:00 UTC) #6
Message was sent while issue was closed.
Hmm, this seems to be causing a test failure on Windows in llvm_regression:

2014-01-07 09:42:22.722221 ******************** TEST 'LLVM ::
Transforms/NaCl/expand-indirectbr.ll' FAILED ********************
...
2014-01-07 09:42:22.722221 Exit Code: 2
2014-01-07 09:42:22.722221 Command Output (stderr):
2014-01-07 09:42:22.722221 --
2014-01-07 09:42:22.722221 Stack dump:
2014-01-07 09:42:22.722221 0.	Program arguments:
/cygdrive/c/b/build/slave/win-pnacl-x86_32/build/native_client/pnacl/build/llvm_x86_32/Release+Asserts/bin/opt
/cygdrive/c/b/build/slave/win-pnacl-x86_32/build/native_client/pnacl/git/llvm/test/Transforms/NaCl/expand-indirectbr.ll
-expand-indirectbr -S 
2014-01-07 09:42:22.722221 1.	Running pass 'Expand out indirectbr and
blockaddress (computed gotos)' on module
'/cygdrive/c/b/build/slave/win-pnacl-x86_32/build/native_client/pnacl/git/llvm/test/Transforms/NaCl/expand-indirectbr.ll'.
2014-01-07 09:42:22.722221 FileCheck error: '-' is empty.

(from
http://build.chromium.org/p/client.nacl.toolchain/builders/win-pnacl-x86_32/b...)

Not sure what is going on here.  run_computed_goto_test in Scons does pass,
though, so hopefully this doesn't block other people at the moment?

Powered by Google App Engine
This is Rietveld 408576698