summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/store-results.ll
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Disable the store-results optimization.Dan Gohman2016-08-181-72/+0
| | | | | | | | | | The WebAssemly spec removing the return value from store instructions, so remove the associated optimization from LLVM. This patch leaves the store instruction operands in place for now, so stores now always write to "$drop"; these will be removed in a seperate patch. llvm-svn: 279100
* [WebAssembly] Optimize away return instructions using fallthroughs.Dan Gohman2016-05-211-1/+1
| | | | | | | | | This saves a small amount of code size, and is a first small step toward passing values on the stack across block boundaries. Differential Review: http://reviews.llvm.org/D20450 llvm-svn: 270294
* [WebAssembly] Rename $discard to $drop in the assembly output.Dan Gohman2016-05-171-2/+2
| | | | llvm-svn: 269862
* [WebAssembly] Move register stackification and coloring to a late phase.Dan Gohman2016-05-101-1/+2
| | | | | | | | | | | | | | | | | | | Move the register stackification and coloring passes to run very late, after PEI, tail duplication, and most other passes. This means that all code emitted and expanded by those passes is now exposed to these passes. This also eliminates the need for prologue/epilogue code to be manually stackified, which significantly simplifies the code. This does require running LiveIntervals a second time. It's useful to think of these late passes not as late optimization passes, but as a domain-specific compression algorithm based on knowledge of liveness information. It's used to compress the code after all conventional optimizations are complete, which is why it uses LiveIntervals at a phase when actual optimization passes don't typically need it. Differential Revision: http://reviews.llvm.org/D20075 llvm-svn: 269012
* WebAssembly: don't optimize frameindex storeJF Bastien2016-01-301-0/+10
| | | | | | | | The previous code was incorrect (can't getReg a frameindex). We could instead optimize it to reduce tree height, but I'm not sure that's worthwhile yet because we then try to eliminate the frameindex. This patch also fixes frame index elimination for operations which may load or store: it used to assume the base was operand 2 and immediate offset operand 1. That's not true for stores, where they're 4 and 3. llvm-svn: 259305
* [WebAssembly] Tighten up some regexes in some tests.Dan Gohman2016-01-201-1/+1
| | | | llvm-svn: 258295
* [WebAssembly] Rematerialize constants rather than hold them live in registers.Dan Gohman2016-01-191-2/+2
| | | | | | | | | 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] Add -m:e to the target triple.Dan Gohman2016-01-071-1/+1
| | | | | | | This enables ELF-style name mangling, which primarily means using ".L" for private symbols. llvm-svn: 257020
* [WebAssembly] Implement instruction selection for constant offsets in addresses.Dan Gohman2015-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | Add instruction patterns for matching load and store instructions with constant offsets in addresses. The code is fairly redundant due to the need to replicate everything between imm, tglobaldadr, and texternalsym, but this appears to be common tablegen practice. The main alternative appears to be to introduce matching functions with C++ code, but sticking with purely generated matchers seems better for now. Also note that this doesn't yet support offsets from getelementptr, which will be the most common case; that will depend on a change in target-independent code in order to set the NoUnsignedWrap flag, which I'll submit separately. Until then, the testcase uses ptrtoint+add+inttoptr with a nuw on the add. Also implement isLegalAddressingMode with an approximation of this. Differential Revision: http://reviews.llvm.org/D15538 llvm-svn: 255681
* [WebAssembly] Tighten up several CHECK tests.Dan Gohman2015-12-101-4/+4
| | | | llvm-svn: 255255
* [WebAssembly] Support constant offsets on loads and storesDerek Schuff2015-12-051-3/+3
| | | | | | | | | This is just prototype for load/store for i32 types. I'll add them to the rest of the types if we like this direction. Differential Revision: http://reviews.llvm.org/D15197 llvm-svn: 254807
* [WebAssembly] Fix dominance check for PHIs in the StoreResult passDan Gohman2015-12-031-0/+43
| | | | | | | | | | | | | | When a block has no terminator instructions, getFirstTerminator() returns end(), which can't be used in dominance checks. Check dominance for phi operands separately. Also, remove some bits from WebAssemblyRegStackify.cpp that were causing trouble on the same testcase; they were left behind from an earlier experiment. Differential Revision: http://reviews.llvm.org/D15210 llvm-svn: 254662
* [WebAssembly] Add a test for wasm-store-results passDerek Schuff2015-12-031-0/+18
Differential Revision: http://reviews.llvm.org/D15167 llvm-svn: 254570
OpenPOWER on IntegriCloud