summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly
Commit message (Collapse)AuthorAgeFilesLines
...
* [WebAssembly] Update test expectationsDerek Schuff2016-01-291-63/+1
| | | | llvm-svn: 259223
* [WebAssembly] Support frame pointerDerek Schuff2016-01-293-17/+82
| | | | | | | | | Add support for frame pointer use in prolog/epilog. Supports dynamic allocas but not yet over-aligned locals. Target-independend CG generates SP updates, but we still need to write back the SP value to memory when necessary. llvm-svn: 259220
* Revert r259035, it introduces a cyclic library dependencyOliver Stannard2016-01-281-2/+57
| | | | llvm-svn: 259045
* Unbreak the wasm backend again after r259035.Benjamin Kramer2016-01-281-1/+1
| | | | llvm-svn: 259040
* Add backend dignostic printer for unsupported featuresOliver Stannard2016-01-281-56/+1
| | | | | | | | | | | | | | | | Re-commit of r258951 after fixing layering violation. The related LLVM patch adds a backend diagnostic type for reporting unsupported features, this adds a printer for them to clang. In the case where debug location information is not available, I've changed the printer to report the location as the first line of the function, rather than the closing brace, as the latter does not give the user any information. This also affects optimisation remarks. Differential Revision: http://reviews.llvm.org/D16590 llvm-svn: 259035
* WebAssembly: fix buildJF Bastien2016-01-281-1/+1
| | | | | | r259016 didn't also revert r258957 which broken the WebAssembly build. llvm-svn: 259020
* Revert r258951 (and r258950), "Refactor backend diagnostics for unsupported ↵NAKAMURA Takumi2016-01-281-0/+55
| | | | | | | | | | | features" It broke layering violation in LLVMIR. clang r258950 "Add backend dignostic printer for unsupported features" llvm r258951 "Refactor backend diagnostics for unsupported features" llvm-svn: 259016
* [WebAssembly] Don't stackify a register def past a get_local use in the same ↵Dan Gohman2016-01-281-1/+13
| | | | | | tree. llvm-svn: 259013
* [WebAssembly] Enhanced register stackificationDan Gohman2016-01-285-75/+361
| | | | | | | | | | | This patch revamps the RegStackifier pass with a new tree traversal mechanism, enabling three major new features: - Stackification of values with multiple uses, using the result value of set_local - More aggressive stackification of instructions with side effects - Reordering operands in commutative instructions to enable more stackification. llvm-svn: 259009
* [WebAssembly] Implement byval argumentsDerek Schuff2016-01-272-73/+22
| | | | | | | | | | Summary: Just does the simple allocation of a stack object and passes a pointer to the callee. Differential Revision: http://reviews.llvm.org/D16610 llvm-svn: 258989
* Unbreak wasm build after r258951.Benjamin Kramer2016-01-271-1/+1
| | | | llvm-svn: 258957
* Refactor backend diagnostics for unsupported featuresOliver Stannard2016-01-271-55/+0
| | | | | | | | | | | | | | | | | | | | | The BPF and WebAssembly backends had identical code for emitting errors for unsupported features, and AMDGPU had very similar code. This merges them all into one DiagnosticInfo subclass, that can be used by any backend. There should be minimal functional changes here, but some AMDGPU tests have been updated for the new format of errors (it used a slightly different format to BPF and WebAssembly). The AMDGPU error messages will now benefit from having precise source locations when debug info is available. The implementation of DiagnosticInfoUnsupported::print must be in lib/Codegen rather than in the existing file in lib/IR/ to avoid introducing a dependency from IR to CodeGen. Differential Revision: http://reviews.llvm.org/D16590 llvm-svn: 258951
* Rename TargetSelectionDAGInfo into SelectionDAGTargetInfo and move it to ↵Benjamin Kramer2016-01-271-3/+3
| | | | | | | | CodeGen/ It's a SelectionDAG thing, not a Target thing. llvm-svn: 258939
* Make some headers self-contained, remove unused includes that violate layering.Benjamin Kramer2016-01-271-1/+0
| | | | llvm-svn: 258937
* [WebAssembly] Omit no-op adds for non-mem uses of FrameIndexDerek Schuff2016-01-263-10/+17
| | | | | | Differential Revision: http://reviews.llvm.org/D16554 llvm-svn: 258872
* Remove autoconf supportChris Bieneman2016-01-265-89/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* [WebAssembly] Remove check for FrameIndex operands in WebAssemblyPeepholeDerek Schuff2016-01-261-14/+9
| | | | | | | This pass runs after FrameIndex elimination, so it should never see FI operands. NFC llvm-svn: 258860
* WebAssembly NFC: update error messageJF Bastien2016-01-261-1/+2
| | | | | | I forgot to update this one in my previous patch. llvm-svn: 258853
* WebAssembly: don't optimize memcpy/memmove/memcpy to frame indexJF Bastien2016-01-262-20/+31
| | | | | | r258781 optimized memcpy/memmove/memcpy so the intrinsic call can return its first argument, but missed the frame index case. Teach it to ignore that case so C code doesn't assert out in these cases. llvm-svn: 258851
* Update wasm target for r258819.Benjamin Kramer2016-01-261-1/+1
| | | | llvm-svn: 258827
* [WebAssembly] Fix a typo in a comment.Dan Gohman2016-01-261-1/+1
| | | | llvm-svn: 258810
* [WebAssembly] Optimize memcpy/memmove/memcpy calls.Dan Gohman2016-01-263-41/+127
| | | | | | | | These calls return their first argument, but because LLVM uses an intrinsic with a void return type, they can't use the returned attribute. Generalize the store results pass to optimize these calls too. llvm-svn: 258781
* [WebAssembly] Remove a completed entry from the README.txt.Dan Gohman2016-01-261-4/+0
| | | | llvm-svn: 258780
* [WebAssembly] Implement unaligned loads and stores.Dan Gohman2016-01-2616-246/+489
| | | | | | Differential Revision: http://reviews.llvm.org/D16534 llvm-svn: 258779
* [WebAssembly] Fix unbalanced register stack code in the case of late DCE.Dan Gohman2016-01-251-3/+3
| | | | | | | Instructions can be DCE'd after the RegStackify pass. If the instruction which would be the pop for what would be a push is removed, don't use a push. llvm-svn: 258694
* [WebAssembly] Minor code formatting cleanups. NFC.Dan Gohman2016-01-253-9/+10
| | | | llvm-svn: 258692
* [WebAssembly] Fix RegNumbering for the stack pointerDerek Schuff2016-01-231-5/+13
| | | | | | | | | Previously it failed to add NumArgRegs to the offset and so clobbered an already-used register. Now just start the numbering after the arg regs and don't duplicate the add. Test coverage for this coming shortly with the implementation of byval. llvm-svn: 258597
* NFC WebAssembly: update linksJF Bastien2016-01-221-2/+2
| | | | | | I got a vanity URL, and moved the github waterfall repo. llvm-svn: 258484
* [WebAssembly] Minor code cleanups. NFC.Dan Gohman2016-01-206-12/+13
| | | | llvm-svn: 258294
* [WebAssembly] Remove the Relooper code, as it is not currently being used.Dan Gohman2016-01-204-1173/+0
| | | | llvm-svn: 258293
* [WebAssembly] Don't stackify stores across instructions with side effects.Dan Gohman2016-01-201-1/+1
| | | | llvm-svn: 258285
* [WebAssembly] Remove an unused data member. NFC.Dan Gohman2016-01-193-10/+7
| | | | llvm-svn: 258192
* WebAssembly: mark known failure caused by r258125JF Bastien2016-01-191-0/+3
| | | | | | | The following test program triggers the assertion: https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.c-torture/execute/20030916-1.c llvm-svn: 258182
* [WebAssembly] Rematerialize constants rather than hold them live in registers.Dan Gohman2016-01-194-40/+77
| | | | | | | | | Teach the register stackifier to rematerialize constants that have multiple uses instead of leaving them in registers. In the WebAssembly encoding, it's the same code size to materialize most constants as it is to read a value from a register. llvm-svn: 258142
* [WebAssembly] Disable some WebAssembly-specific optimization passes at -O0.Dan Gohman2016-01-191-3/+6
| | | | llvm-svn: 258127
* [WebAssembly] Use the templated form of MachineFunction::getSubtarget(). NFC.Dan Gohman2016-01-192-5/+4
| | | | llvm-svn: 258126
* [WebAssembly] Add some more README.txt entries.Dan Gohman2016-01-161-0/+10
| | | | llvm-svn: 257969
* [WebAssembly] Don't create a needless .note.GNU-stack sectionDan Gohman2016-01-151-0/+3
| | | | | | | | | | WebAssembly's stack will never be executable by default, so it isn't necessary to declare .note.GNU-stack sections to request a non-executable stack. Differential Revision: http://reviews.llvm.org/D15969 llvm-svn: 257962
* Update to use new name alignTo().Rui Ueyama2016-01-141-5/+5
| | | | llvm-svn: 257804
* WebAssembly: mark a few new failuresJF Bastien2016-01-141-0/+8
| | | | | | | | | | | | A recent change introduced this assertion failure in some corner cases. Repro: mkdir /s/wasm/torture-out ; time /s/wasm/waterfall/src/compile_torture_tests.py --c /s/llvm/out/bin/clang --cxx /s/llvm/out/bin/clang++ --testsuite /s/gcc/gcc/testsuite --fails /s/llvm/llvm/lib/Target/WebAssembly/known_gcc_test_failures.txt --out /s/wasm/torture-out Or look on the wasm integration bot: https://build.chromium.org/p/client.wasm.llvm/console llvm-svn: 257733
* WebAssembly: fix build break introduced by ELFObjectWriter churnJF Bastien2016-01-131-3/+4
| | | | llvm-svn: 257709
* [WebAssembly] Add an assertion to catch unexpected MCFixupKindInfo flags.Dan Gohman2016-01-131-0/+2
| | | | llvm-svn: 257657
* [WebAssembly] MCFixupKindInfo's TargetSize is in bits rather than bytes.Dan Gohman2016-01-131-2/+2
| | | | llvm-svn: 257655
* [WebAssemly] Invalidate liveness in CFG stackifierDerek Schuff2016-01-131-0/+3
| | | | | | | WebAssemblyCFGStackify does not track liveness for EXPR_STACK, causing verifier failure if liveness has not already been invalidated. llvm-svn: 257620
* [WebAssembly] Fix disassembler shared-libs buildDerek Schuff2016-01-121-1/+2
| | | | llvm-svn: 257536
* [WebAsssembly] Register the MC register info.Dan Gohman2016-01-121-0/+9
| | | | llvm-svn: 257525
* [WebAssembly] Add a EM_WEBASSEMBLY value, and several bits of code that use it.Dan Gohman2016-01-122-5/+3
| | | | | | | | | A request has been made to the official registry, but an official value is not yet available. This patch uses a temporary value in order to support development. When an official value is recieved, the value of EM_WEBASSEMBLY will be updated. llvm-svn: 257517
* [WebAssembly] Introduce a WebAssemblyTargetStreamer class.Dan Gohman2016-01-129-64/+225
| | | | | | | Refactor .param, .result, .local, and .endfunc, as directives, using the proper MCTargetStreamer mechanism, rather than fake instructions. llvm-svn: 257511
* [WebAssembly] Make CFG stackification independent of basic-block labels.Dan Gohman2016-01-128-82/+161
| | | | | | | | | | | | | | | | | | | | | | | This patch changes the way labels are referenced. Instead of referencing the basic-block label name (eg. .LBB0_0), instructions now just have an immediate which indicates the depth in the control-flow stack to find a label to jump to. This makes them much closer to what we expect to have in the binary encoding, and avoids the problem of basic-block label names not being explicit in the binary encoding. Also, it terminates blocks and loops with end_block and end_loop instructions, rather than basic-block label names, for similar reasons. This will also fix problems where two constructs appear to have the same label, because we no longer explicitly use labels, so consumers that need labels will presumably create their own labels, and presumably they won't reuse labels when they do. This patch does make the code a little more awkward to read; as a partial mitigation, this patch also introduces comments showing where the labels are, and comments on each branch showing where it's branching to. llvm-svn: 257505
* [WebAssembly] Implement a prototype instruction encoder and disassembler.Dan Gohman2016-01-127-24/+231
| | | | | | | This is using an extremely simple temporary made-up binary format, not the official binary format (which isn't defined yet). llvm-svn: 257440
OpenPOWER on IntegriCloud