aboutsummaryrefslogtreecommitdiff
path: root/tools/pnacl-llc
AgeCommit message (Collapse)Author
2013-09-13Report fatal translator errors to the browserDerek Schuff
Install a fatal error handler for the translator, which stores the error string, signals an error to the RPC thread, and terminates the thread (instead of terminating the whole program). This will cause the error to go to the Javascript console in Chrome BUG= https://code.google.com/p/nativeclient/issues/detail?id=3519 R=jvoung@chromium.org Review URL: https://codereview.chromium.org/23753003
2013-08-13Add pnacl-llc CMake dependency on LLVMNaClTransforms.JF Bastien
Some CMake builds fail to build without it. It's probably a race. R=jvoung@chromium.org Review URL: https://codereview.chromium.org/23002005
2013-07-31Copy (strdup) a command-line arg to avoid use-after-free.Jim Stichnoth
There may be a better way to handle this that avoids leaking the command-line arguments. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3605 R=dschuff@chromium.org Review URL: https://codereview.chromium.org/21375003
2013-07-25More pnacl-llc cleanups.Eli Bendersky
Focus on nacl_file and its interface with pnacl-llc.cpp; nacl_file as a name no longer makes sense, and neither do the comments describing it - so rename it. Also cleanup the interface a bit, and use more LLVM-y stuff instead of new data types. BUG=None R=dschuff@chromium.org, jfb@chromium.org Review URL: https://codereview.chromium.org/20186002
2013-07-23More cleanups of pnacl-llc.Eli Bendersky
Simplifying code, style, removing unnecessary code & includes, etc. BUG=None R=jfb@chromium.org Review URL: https://codereview.chromium.org/19808004
2013-07-19Switch to the upstream way to measure IR parsing time, since we have 3.3 nowEli Bendersky
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3349 R=stichnot@chromium.org Review URL: https://codereview.chromium.org/19500012
2013-07-18Merge remote-tracking branch 'origin/master'Eli Bendersky
2013-07-16Make it compileEli Bendersky
2013-07-15Clean up some duplicated and/or unused code in pnacl-llc.Eli Bendersky
No functionality change. BUG=None R=jvoung@chromium.org Review URL: https://codereview.chromium.org/19235002
2013-07-15Run the LLVM IR verifier just once in pnacl-llc.Eli Bendersky
By default, using the path inherited from llc, the verifier is run twice. We only need it to run once right after reading the bitcode in and before the ABI verifier runs. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3553 R=jvoung@chromium.org Review URL: https://codereview.chromium.org/18920004
2013-07-01Cleanup of pnacl-llc.Eli Bendersky
Removing some code and comments that aren't needed. BUG=None R=jvoung@chromium.org Review URL: https://codereview.chromium.org/18348005
2013-06-28Change header include for llvm.nacl.target.arch in pnacl-llc.Jan Voung
Have nacl-file include "pnacl.h" from the nacl repo, instead of from the toolchain's standard include locations, so that it can be moved out of the toolchain tarball and not advertise it to normal developers. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3525 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/18178007
2013-06-24Force user to provide -mptriple to pnacl-llc.Eli Bendersky
We already always provide -mptriple to pnacl-llc, and it's nonsensical to run it without it because pexe don't contain a triple. BUG=None R=dschuff@chromium.org Review URL: https://codereview.chromium.org/17617002
2013-06-20Clean-up pnacl-llc a bit, now that it's truly PNaCl-only.Eli Bendersky
No changes in functionality. Specific cleanups: * Use OwningPtr instead of bare pointer for FDOut * Command-line help should say pnacl-llc instead of a generic llvm message * Remove support for "skip module" feature * Remove some LOCALMOD comments * Add link to issue for TODO about timing IR parsing BUG=None R=jvoung@chromium.org, kschimpf@google.com Review URL: https://codereview.chromium.org/17101032
2013-06-17PNaCl: Turn on ABI verifier by default in sandboxed translatorMark Seaborn
Change pnacl-llc.cpp to enable the verifier. This causes two problems which we fix: * The ABI check for declared-but-not-defined functions fails in streaming mode. Fixing this would involve changing the bitcode reader. For now, disable this check when in streaming mode. Add a flag to PNaClABIVerifyModule. * ARM's GlobalMerge pass modifies functions' global variable references to use ConstantExprs that the ABI checker rejects. Address this by disabling GlobalMerge for now. GlobalMerge does not provide much benefit at the moment anyway, because, with the FlattenGlobals pass applied, GlobalMerge doesn't merge variables with alignment >1. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3465 TEST=PNaCl toolchain trybots Review URL: https://codereview.chromium.org/17190002
2013-06-17When running pnacl-llc sandboxed, force input to always be PNaCl bitcode.Karl Schimpf
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3469 R=jvoung@chromium.org Review URL: https://codereview.chromium.org/17295004
2013-06-12Remove a stray usage of NACL_SRPCEli Bendersky
BUG=None R=dschuff@chromium.org Review URL: https://codereview.chromium.org/16663008
2013-06-11Clean-up shared-library related code from pnacl-llc.Eli Bendersky
BUG=None R=dschuff@chromium.org Review URL: https://codereview.chromium.org/16123031
2013-06-10Merge the NACL_SRPC preprocessor flag into __native_client__Eli Bendersky
We always build the sandboxed translator with NACL_SRPC. BUG=None R=jvoung@chromium.org Review URL: https://codereview.chromium.org/16667016
2013-06-07Fix Mispelled local variable in llc.Karl Schimpf
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3479 R=dschuff@chromium.org Review URL: https://codereview.chromium.org/16440008
2013-06-07Add CL argument -bitcode-format to llvm-dis, llc, and pnacl-llc.Karl Schimpf
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3469 R=jvoung@chromium.org Review URL: https://codereview.chromium.org/16385002
2013-05-28Update llc/pnacl-llc makefiles to link nacltransforms.Eli Bendersky
i686 translator build fails otherwise, not finding the symbols for passes invoked by llc. This breakage was introduced by commit ffc13bcb40d4257202295fc0ffe25b38bdf64263 BUG=https://code.google.com/p/nativeclient/issues/detail?id=3429 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/15786007
2013-05-28Add two passes that implement conversions from PNaCl's specific intrinsicsEli Bendersky
to external function calls during the translation stage (llc). One of the passes is a ModulePass that adds the appropriate function declarations to the module. The other is a FunctionPass that performs the actual call replacement. This split exists because of bitcode streaming. Initially the passes handle the llvm.nacl.{set|long}jmp intrinsics. In the future they may handle additional intrinsics that are part of the PNaCl stable bitcode ABI. This CL also removes the previous approach to handling this conversion (in SelectionDAGBuilder.cpp). That ended up not working - more details in issue 3429. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3429 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/16047002
2013-05-21The RecordMetadataForSrpc function that was removed initialized ↵Eli Bendersky
NaClRecordObjectInformation, and this initialization has to be reinstated. BUG=None R=dschuff@chromium.org Review URL: https://codereview.chromium.org/15451003
2013-05-15Separate the PNaCl llc into a tool named pnacl-llc (how original!)Eli Bendersky
BUG=None R=jvoung@chromium.org Review URL: https://codereview.chromium.org/14604011