Age | Commit message (Collapse) | Author |
|
|
|
|
|
For now benchmarks reading/parsing/LLVM IR forming from PNaCl bitcode
BUG=None
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/76973002
|
|
Factors out bitcode parser from pnacl-bcanalyzer, so that it can also
be used for PNaCl bitcode to bitcode rewriters.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3720
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/48623003
|
|
We are using our own bitcode reader now, and no longer need this.
R=jvoung@chromium.org, kschimpf@google.com
BUG=cleanup
Review URL: https://codereview.chromium.org/32943005
|
|
setjmp()+longjmp()
There are two parts to this:
* PNaClSjLjEH.cpp expands out the "invoke", "landingpad" and "resume"
instructions, modifying the control flow to use setjmp().
* ExceptionInfoWriter.cpp lowers landingpads' clause lists to data
that PNaCl's C++ runtime library will interpret. This part will be
reused when we drop the SjLj part and create a stable ABI for
zero-cost EH.
This pass isn't enabled in PNaClABISimplify yet: I'll do that in a
separate change.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3696
TEST=*.ll tests (also tested end-to-end: plumbing for this will follow later)
Review URL: https://codereview.chromium.org/24777002
|
|
Since we deleted the rewrite of ARM -> LE32 in the
bitcode reader, opt is unable to look up a TTI to transform
switch(c) { case 1: x = <const1>; break; case 2: x = <const2>; break; ... }
into a lookup table to get x from c.
This causes a regression in pnacl-llc's size (which has
lots of switch statements).
Fake the target lookup in opt for now. Eventually we should
look into making target info for le32.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2554
TEST= trybot http://chromegw.corp.google.com/i/tryserver.nacl/builders/nacl-toolchain-linux-pnacl-x86_64/builds/887
http://chromegw.corp.google.com/i/tryserver.nacl/builders/nacl-toolchain-mac-pnacl-x86_32/builds/842
R=dschuff@chromium.org
Review URL: https://codereview.chromium.org/23551013
|
|
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
|
|
Only the bitcode linker via gold / lto module cares about
le32 being a target w/ a real backend.
LTOModule/LTOCodeGenerator is interested in having a real
target to know the name mangling and assembly notation
conventions (e.g., what's the prefix for private symbols).
This removes the hack from the bitcode reader so that
tools like llvm-dis are not affected and nonfinal pexes can
still say that they are "le32".
This is still not pretty, but it's better than polluting
the BitcodeReader, especially if certain tools check
what llvm-dis returns, and this doesn't require making a
dummy backend just for name mangling and asm conventions.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2554
TEST= trybots
http://chromegw.corp.google.com/i/tryserver.nacl/builders/nacl-toolchain-linux-pnacl-x86_32/builds/826
http://chromegw.corp.google.com/i/tryserver.nacl/builders/nacl-toolchain-mac-pnacl-x86_32/builds/830
http://chromegw.corp.google.com/i/tryserver.nacl/builders/nacl-toolchain-linux-pnacl-x86_64/builds/876
R=dschuff@chromium.org
Review URL: https://codereview.chromium.org/23619038
|
|
These blocks are never generated by the PNaCl bitcode writer. The
code for generating them was removed when BitcodeWriter.cpp was copied
to produce NaClBitcodeWriter.cpp in
5712db994c8a4abb8c2512fb2900650f8335af66. The same wasn't done when
BitcodeReader.cpp was copied to produce NaClBitcodeReader.cpp, so we
do this now.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3590
TEST=PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/23598005
|
|
This also should complete the changes associated with removing pointer cast
instructions from the PNaCl bitcode file.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3544
R=dschuff@chromium.org, jvoung@chromium.org
Review URL: https://codereview.chromium.org/23482002
|
|
and symbol wrapping
This reverts the local modifications to the gold plugin and liblto for
bitcode shared objects and for symbol wrapping, neither of which are used or tested anymore. It depends
on a corresponding change to the linker plugin API.
R=eliben@chromium.org, jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3520
Review URL: https://codereview.chromium.org/22831032
|
|
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3627
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/23060004
|
|
Some CMake builds fail to build without it. It's probably a race.
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/23002005
|
|
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3626
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/23072004
|
|
This is a follow-up to:
https://codereview.chromium.org/22240002/
And requires the Clang changes from:
https://codereview.chromium.org/22294002/
This new intrinsic represents ``asm("":::"~{memory}")`` as well as ``__sync_synchronize()``, and in IR it corresponds to a sequentially-consistent fence surrounded by ``call void asm sideeffect "", "~{memory}"()``.
R=jvoung@chromium.org
TEST= ninja check-all
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475
Review URL: https://codereview.chromium.org/22474008
|
|
Original localmod: https://codereview.chromium.org/10808021/
which fixes some quadratic behavior.
Xiaofei Wan fixed the quadratic behavior upstream differently, via
a series of commits around:
http://llvm.org/viewvc/llvm-project?view=revision&revision=181104
and it is actually faster:
~7 seconds to link pnacl-llc w/ just the upstream fix
~11 seconds to link with localmod
(used to be ~120 seconds w/ quadratic behavior)
BUG=http://code.google.com/p/nativeclient/issues/detail?id=2883
TEST= trybots: http://chromegw.corp.google.com/i/tryserver.nacl/builders/nacl-toolchain-linux-pnacl-x86_64/builds/784
R=eliben@chromium.org
Review URL: https://codereview.chromium.org/22509002
|
|
Elides inttoptr casts used (exclusively) in load instructions when
PNaClVersion=2. This is an incremental start on removing the inttoptr
instruction from the PNaCl wire format (See issue 3544 for more information
on the strategy of removing ptrtoint).
Also modifies PNaCl bitcode reader/writer to accept PNaClVersion=1 as supported,
and PNaClVersion=2 as unsupported but readable (allowing pnacl-freeze and
pnacl-thaw to work on such files).
Also allows command-line option --pnacl-version for setting PNaClVersion in the
PNaCl bitcode writer.
Also fixes some problems on PNaCl bitcode headers, using common support to
determine when the read/written PNaCl bitcode file is valid.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3544
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/5812155903377408
|
|
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
|
|
This is often used as a compiler barrier and should "just work" in user code.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2345
R=eliben@chromium.org
TEST= (cd ./pnacl/build/llvm_x86_64 && ninja check-all)
Review URL: https://codereview.chromium.org/21178002
|
|
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
|
|
Simplifying code, style, removing unnecessary code & includes, etc.
BUG=None
R=jfb@chromium.org
Review URL: https://codereview.chromium.org/19808004
|
|
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3349
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/19500012
|
|
|
|
|
|
Conflicts:
docs/LangRef.rst
include/llvm/CodeGen/CallingConvLower.h
include/llvm/IRReader/IRReader.h
include/llvm/Target/TargetMachine.h
lib/CodeGen/CallingConvLower.cpp
lib/IRReader/IRReader.cpp
lib/IRReader/LLVMBuild.txt
lib/IRReader/Makefile
lib/LLVMBuild.txt
lib/Makefile
lib/Support/MemoryBuffer.cpp
lib/Support/Unix/PathV2.inc
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMSubtarget.cpp
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/Mips/CMakeLists.txt
lib/Target/Mips/MipsDelaySlotFiller.cpp
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/Mips/MipsInstrInfo.td
lib/Target/Mips/MipsSubtarget.cpp
lib/Target/Mips/MipsSubtarget.h
lib/Target/X86/X86FastISel.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrControl.td
lib/Target/X86/X86InstrFormats.td
lib/Transforms/IPO/ExtractGV.cpp
lib/Transforms/InstCombine/InstCombineCompares.cpp
lib/Transforms/Utils/SimplifyLibCalls.cpp
test/CodeGen/X86/fast-isel-divrem.ll
test/MC/ARM/data-in-code.ll
tools/Makefile
tools/llvm-extract/llvm-extract.cpp
tools/llvm-link/CMakeLists.txt
tools/opt/CMakeLists.txt
tools/opt/LLVMBuild.txt
tools/opt/Makefile
tools/opt/opt.cpp
|
|
No functionality change.
BUG=None
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/19235002
|
|
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
|
|
Add portable support for concurrency in PNaCl's ABI:
- Promote volatile to atomic.
- Promote all memory ordering to sequential consistency.
- Rewrite all atomic operations to frozen NaCl intrinsics for pexe.
- Rewrite atomic intrinsics to LLVM instructions for translation.
This change also adds documentation to the PNaCl language reference, as
well as tests where it makes sense.
A future CL could clean up more of our code which mentions atomics,
volatiles, memory orderings.
Multiple reviewers because this is a big patch:
- eliben: LLVM-fu and ResolvePNaClIntrinsics.
- dschuff: ABI stability.
- mseaborn: ABI stability.
- sehr: Tron-duty (fight for the user's programs to work).
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475
R=dschuff@chromium.org, eliben@chromium.org, sehr@google.com
TEST= (cd ./pnacl/build/llvm_x86_64; ninja check-all) && ./pnacl/test.sh test-x86-32 && ./pnacl/test.sh test-x86-64 && ./pnacl/test.sh test-arm && ./pnacl/test.sh test-x86-32-sbtc && ./pnacl/test.sh test-x86-64-sbtc && ./pnacl/test.sh test-arm-sbtc
Review URL: https://codereview.chromium.org/17777004
|
|
This allows running the utility on finalized/frozen pexes.
R=kschimpf@google.com
BUG=none
Review URL: https://codereview.chromium.org/18884003
|
|
(1) Fix spacing in header of record histogram so that columns line up.
(2) Only print 8 operands per line in the dump. Keeps lines from getting
too long.
BUG=None
R=jvoung@chromium.org, mseaborn@chromium.org
Review URL: https://codereview.chromium.org/18147006
|
|
Generates simple global variable records, followed by list of records defining
byte initialization and relocations.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3504
R=mseaborn@chromium.org
Review URL: https://codereview.chromium.org/18111002
|
|
Removing some code and comments that aren't needed.
BUG=None
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/18348005
|
|
Convert calls to this intrinsic to use the 32-bit variant instead. Do
the same for the memcpy and memmove intrinsics too.
Change the PNaCl ABI verifier to check this argument.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3530
TEST=*.ll tests + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/18226003
|
|
This is no longer required, following our recent PNaCl ABI cleanups.
BUG=None
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/18031017
|
|
BUG=None
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/18153009
|
|
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
|
|
Disallow i1 on loads/stores and require the conversions to i8 to be
explicit. Add a pass, PromoteI1Ops, that adds the conversions.
(Load/store on i1 occur in practice in small_tests for some boolean
globals.)
Disallow i1 for most arithmetic/comparison operations since these
aren't very useful and it's a nuisance for a code generator to have to
support these. I haven't seen these occur in practice, but
PromoteI1Ops nevertheless expands them.
We still allow and/or/xor on i1 because these do occur in practice,
and they're less of a nuisance to handle because they never overflow:
no truncation to 1 bit is required, unlike with adds.
Restrict the type of alloca's argument. Clang always uses i32 here.
Disallow i1 in switch instructions. Clang doesn't generate i1
switches for booleans.
Move CopyLoadOrStoreAttrs() helper into a header to reuse.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3490
TEST=PNaCl toolchain trybots + GCC torture tests + Spec2k
Review URL: https://codereview.chromium.org/17356011
|
|
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
|
|
Simplify instruction records by adding concept of a forward type reference
map that maps ValueID's to types. Used to generate forward reference types
for instruction arguments that need a type because the forward reference
has not yet been generated.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3507
R=jvoung@chromium.org, mseaborn@chromium.org
Review URL: https://codereview.chromium.org/16963004
|
|
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
|
|
Until there is an intrinsic to *set* the rounding mode,
this intrinsic to *get* the rounding mode isn't so useful.
Separately we will add a test that for each platform, the
initial rounding mode is "1" (round to nearest). That is
the case right now for x86, ARM, and MIPS.
(see https://codereview.chromium.org/16785003/)
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3491
R=mseaborn@chromium.org
Review URL: https://codereview.chromium.org/17229007
|
|
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
|
|
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3469
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/17295004
|
|
tools/llc is reset to revision 279b9184c2ff4fea93b198a3519b8cb3a1d8d195
from which the last LLVM merge was made. NaCl-specific files are
removed.
BUG=None
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/16510008
|
|
BUG=None
R=dschuff@chromium.org
Review URL: https://codereview.chromium.org/16663008
|
|
BUG=None
R=dschuff@chromium.org
Review URL: https://codereview.chromium.org/16123031
|
|
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3485
R=kschimpf@google.com
Review URL: https://codereview.chromium.org/16146012
|
|
We always build the sandboxed translator with NACL_SRPC.
BUG=None
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/16667016
|
|
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3479
R=dschuff@chromium.org
Review URL: https://codereview.chromium.org/16440008
|