summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Minor code cleanups. NFC.Dan Gohman2016-01-081-1/+2
| | | | llvm-svn: 257128
* [WebAssembly] Fix handling of COPY instructions in WebAssemblyRegStackify.Dan Gohman2015-12-251-3/+4
| | | | | | | | | | | | | Move RegStackify after coalescing and teach it to use LiveIntervals instead of depending on SSA form. This avoids a problem where a register in a COPY instruction is stackified and then subsequently coalesced with a register that is not stackified. This also puts it after the scheduler, which allows us to simplify the EXPR_STACK constraint, as we no longer have instructions being reordered after stackification and before coloring. llvm-svn: 256402
* [WebAssembly] Fix the CFG Stackifier to handle unoptimized branchesDan Gohman2015-12-161-2/+14
| | | | | | | If a branch both branches to and falls through to the same block, treat it as an explicit branch. llvm-svn: 255803
* [WebAssembly] Implement a new algorithm for placing BLOCK markersDan Gohman2015-12-141-67/+144
| | | | | | | | | Implement a new BLOCK scope placement algorithm which better handles early-return blocks and early exists from nested scopes. Differential Revision: http://reviews.llvm.org/D15368 llvm-svn: 255564
* [WebAssembly] Fix comments to say "LIFO" instead of "FIFO" when describing a ↵Dan Gohman2015-12-021-1/+1
| | | | | | stack. llvm-svn: 254523
* [WebAssembly] Fix a few minor compiler warnings. NFC.Dan Gohman2015-11-301-7/+7
| | | | llvm-svn: 254311
* [WebAssembly] Minor clang-format and selected clang-tidy cleanups. NFC.Dan Gohman2015-11-291-2/+2
| | | | llvm-svn: 254267
* [WebAssembly] Always print loop end labelsDan Gohman2015-11-231-1/+11
| | | | | | | | | | | | | | | | | WebAssembly is currently using labels to end scopes, so for example a loop scope looks like this: BB0_0: loop BB0_1 ... BB0_1: with BB0_0 being the label of the first block not in the loop. This requires that the label be printed even when it's only reachable via fallthrough. To arrange this, insert a no-op LOOP_END instruction in such cases at the end of the loop. llvm-svn: 253901
* [WebAssembly] Use dominator information to improve BLOCK placementDan Gohman2015-11-231-46/+125
| | | | | | | | | | Always starting blocks at the top of their containing loops works, but creates unnecessarily deep nesting because it makes all blocks in a loop overlap. Refine the BLOCK placement algorithm to start blocks at nearest common dominating points instead, which significantly shrinks them and reduces overlapping. llvm-svn: 253876
* Try to fix build more -- like r252392 but for WebAssembly.Nico Weber2015-11-071-4/+4
| | | | llvm-svn: 252394
* [WebAssembly] Fix CFG stackification of nested loops.Dan Gohman2015-10-021-4/+15
| | | | llvm-svn: 249187
* [WebAssembly] Check in an initial CFG Stackifier passDan Gohman2015-09-161-0/+278
This pass implements a simple algorithm for conversion from CFG to wasm's structured control flow. It doesn't yet handle multiple-entry loops; that will be added in a future patch. It also adds initial support for switch statements. Differential Revision: http://reviews.llvm.org/D12735 llvm-svn: 247818
OpenPOWER on IntegriCloud