summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Fix a few minor compiler warnings. NFC.Dan Gohman2015-11-301-7/+7
| | | | llvm-svn: 254311
* [WebAssembly] Delete an obsolete TODO comment.Dan Gohman2015-11-291-1/+0
| | | | llvm-svn: 254272
* [WebAssembly] Set several MCInstrDesc flags.Dan Gohman2015-11-294-0/+20
| | | | llvm-svn: 254271
* [WebAssembly] Delete unused functions. NFC.Dan Gohman2015-11-291-6/+0
| | | | llvm-svn: 254268
* [WebAssembly] Minor clang-format and selected clang-tidy cleanups. NFC.Dan Gohman2015-11-2913-64/+68
| | | | llvm-svn: 254267
* [WebAssembly] Fix inline asm support for i64 operands.Dan Gohman2015-11-251-1/+5
| | | | llvm-svn: 254106
* [WebAssembly] Fold setne and seteq comparisons into selects.Dan Gohman2015-11-252-0/+28
| | | | llvm-svn: 254104
* [WebAssembly] Add some comments. NFC.Dan Gohman2015-11-251-0/+5
| | | | llvm-svn: 254096
* [WebAssembly] Fix WebAssembly register numbering for registers added late.Dan Gohman2015-11-252-0/+9
| | | | | | | | | If virtual registers are created late, mappings to WebAssembly registers need to be added explicitly. This patch adds a function to do so and teaches WebAssemblyPeephole to use it. This fixes an out-of-bounds access on the WARegs vector. llvm-svn: 254094
* [WebAssembly] Use a physical register to describe ARGUMENT liveness.Dan Gohman2015-11-2510-38/+66
| | | | | | | | | | Instead of trying to move ARGUMENT instructions back up to the top after they've been scheduled or sunk down, use a fake physical register to create a liveness constraint that prevents ARGUMENT instructions from moving down in the first place. This is still not entirely ideal, however it is more robust than letting them move and moving them back. llvm-svn: 254084
* [WebAssembly] Clean up several FIXME comments.Dan Gohman2015-11-256-10/+12
| | | | llvm-svn: 254079
* [WebAssembly] Support for register stackifying with load and store instructions.Dan Gohman2015-11-259-29/+314
| | | | llvm-svn: 254076
* [WebAssembly] Codegen support for ISD::ExternalSymbolDan Gohman2015-11-254-2/+26
| | | | llvm-svn: 254075
* [WebAssembly] Add 'final' to some classes. NFC.Dan Gohman2015-11-252-2/+2
| | | | llvm-svn: 254073
* [WebAssembly] Whitespace consistency. NFC.Dan Gohman2015-11-252-2/+0
| | | | llvm-svn: 254071
* [WebAssembly] Don't print the types of memory_size and grow_memoryDan Gohman2015-11-231-4/+4
| | | | | | This matches the current spec, for now. llvm-svn: 253931
* [WebAssembly] Don't special-case call operand order.Dan Gohman2015-11-231-2/+2
| | | | | | | | With the '=' suffix now indicating which operands are output operands, it's no longer as important to distinguish between a call's inputs and its outputs using operand ordering, so we can go back to printing them in the normal order. llvm-svn: 253925
* [WebAssembly] Suffix output operands with '='.Dan Gohman2015-11-231-0/+3
| | | | | | | | This distinguishes input operands from output operands. This is something of a syntactic experiment to see whether the mild amount of clutter this adds is outweighed by the extra information it conveys to the reader. llvm-svn: 253922
* [WebAssembly] Model the return value of store instructions in wasm.Dan Gohman2015-11-232-27/+41
| | | | llvm-svn: 253916
* [WebAssembly] Don't use set_local instructions explicitly.Dan Gohman2015-11-232-6/+14
| | | | | | | | | The current approach to using get_local and set_local is to use them implicitly, as register uses and defs. Introduce new copy instructions which are themselves no-ops except for the get_local and set_local that they imply, so that we use get_local and set_local consistently. llvm-svn: 253905
* [WebAssembly] Always print loop end labelsDan Gohman2015-11-233-1/+20
| | | | | | | | | | | | | | | | | 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] Remove incomplete MCCodeEmitter bits.Dan Gohman2015-11-232-4/+0
| | | | | | These are parts of a separate patch that I accidentally included in r253878. llvm-svn: 253892
* [WebAssembly] Emit .param, .result, and .local through MC.Dan Gohman2015-11-237-28/+63
| | | | | | This eliminates one of the main remaining uses of EmitRawText. llvm-svn: 253878
* [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
* [WebAssembly] Remove the AsmPrinter code for printing physical registers.Dan Gohman2015-11-201-3/+2
| | | | | | | | WebAssembly does not have physical registers, so even if LLVM uses physical registers like SP, they'll need to be lowered to virtual registers before AsmPrinter time. llvm-svn: 253644
* [WebAssembly] Add a few open tasks to the target README.txt.Dan Gohman2015-11-201-0/+17
| | | | llvm-svn: 253643
* [WebAssembly] Rename SWITCH to TABLESWITCH to match the current wording in ↵Dan Gohman2015-11-204-15/+15
| | | | | | the spec. llvm-svn: 253642
* [WebAssembly] Remove done items from the README.txt.Dan Gohman2015-11-201-3/+0
| | | | llvm-svn: 253640
* [WebAssembly] Add asserts that the expression stack is used in stack order.Dan Gohman2015-11-201-0/+23
| | | | llvm-svn: 253638
* [WebAssemby] Enforce FIFO ordering for instructions using stackified registers.Dan Gohman2015-11-202-0/+30
| | | | llvm-svn: 253634
* Split the argument unscheduling loop in the WebAssembly registerEric Christopher2015-11-201-8/+18
| | | | | | | | | coloring pass. Turn the logic into "look for an insert point and then move things past the insert point". No functional change intended. llvm-svn: 253626
* Fix a [-Werror,-Wcovered-switch-default] warning by removing theEric Christopher2015-11-191-1/+0
| | | | | | unnecessary default case. llvm-svn: 253621
* [WebAssembly] Implement isCheapToSpeculateCtlz and isCheapToSpeculateCttz.Dan Gohman2015-11-192-0/+12
| | | | | | | This unbreaks test/CodeGen/WebAssembly/i32.ll and test/CodeGen/WebAssembly/i64.ll after r224899. llvm-svn: 253617
* [WebAssembly] Add more whitespace characters to prettify the assembly output.Dan Gohman2015-11-182-9/+9
| | | | llvm-svn: 253472
* [WebAssembly] Add some spaces to the assembly output to vertically align ↵Dan Gohman2015-11-182-25/+27
| | | | | | operands. llvm-svn: 253468
* [WebAssembly] Enable register coloring and register stackifying.Dan Gohman2015-11-188-71/+126
| | | | | | | | | | | | | | | | This also takes the push/pop syntax another step forward, introducing stack slot numbers to make it easier to see how expressions are connected. For example, the value pushed in $push7 is popped in $pop7. And, this begins an experiment with making get_local and set_local implicit when an operation directly uses or defines a register. This greatly reduces clutter. If this experiment succeeds, it may make sense to do this for const instructions as well. And, this introduces more special code for ARGUMENTS; hopefully this code will soon be obviated by proper support for live-in virtual registers. llvm-svn: 253465
* [WebAssembly] Fix printing of global operandsDerek Schuff2015-11-171-4/+4
| | | | | | | | | | This was regressed in r252656 which wasn't quite NFC. Instead of using a custom instruction as before, use a pattern to select CONST_I32 for the global addrs. Differential Revision: http://reviews.llvm.org/D14587 llvm-svn: 253276
* [WebAssembly] Fix function return type printingDerek Schuff2015-11-163-29/+32
| | | | | | | | | | | Summary: Previously return type information for a function was derived from return dag nodes. But this didn't work for dags with != return node. So instead compute it directly from the LLVM function as is done for imports. Differential Revision: http://reviews.llvm.org/D14593 llvm-svn: 253251
* [WebAssembly] Reverse the order of operands for br_ifDerek Schuff2015-11-162-6/+6
| | | | | | | | | | | | Summary: This is to match the new version in the spec Reviewers: sunfish Subscribers: jfb, llvm-commits, dschuff Differential Revision: http://reviews.llvm.org/D14519 llvm-svn: 253249
* [WebAssembly] Prototype passes for register coloring and register stackifying.Dan Gohman2015-11-165-0/+341
| | | | | | These passes are not yet enabled by default. llvm-svn: 253217
* [WebAssembly] Use tabs instead of spaces in assembly output.Dan Gohman2015-11-158-85/+85
| | | | | | This seems to be the most popular convention among the other backends. llvm-svn: 253172
* [WebAssembly] Minor code simplification. NFC.Dan Gohman2015-11-141-3/+1
| | | | llvm-svn: 253150
* [WebAssembly] Support signext, zeroext, and several other function attributes.Dan Gohman2015-11-141-22/+0
| | | | llvm-svn: 253148
* [WebAssembly] Rename the Const instructions to be upper-case too.Dan Gohman2015-11-131-4/+4
| | | | llvm-svn: 253072
* [WebAssembly] Rename memory intrinsics to be upper-case, following ↵Dan Gohman2015-11-131-4/+4
| | | | | | convention. NFC. llvm-svn: 253070
* [WebAssembly] Inline asm support.Dan Gohman2015-11-134-0/+80
| | | | llvm-svn: 252997
* [WebAssembly] Un-mangle the conversion instruction names.Dan Gohman2015-11-131-75/+75
| | | | | | | | This arranges the types in the LLVM instruction names in the same order that they appear in the WebAssembly opcode names, and eliminates double-underscores. llvm-svn: 252988
* [WebAssembly] Rename BR_IF_ to BR_IFDan Gohman2015-11-133-6/+6
| | | | | | | With MC-based instruction printing, we no longer need instruction names to mangle in hints about how they should be printed. llvm-svn: 252987
* [WebAssembly] Remove unneeded TODO items. NFC.Dan Gohman2015-11-132-19/+0
| | | | llvm-svn: 252985
* [WebAssembly] Tidy up and update a TODO item. NFC.Dan Gohman2015-11-131-14/+9
| | | | llvm-svn: 252984
OpenPOWER on IntegriCloud