summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
Commit message (Collapse)AuthorAgeFilesLines
...
* [WebAssembly] Update for spec change from tableswitch to br_table.Dan Gohman2016-03-081-4/+4
| | | | | | | Also note that the operand order changed; the default label is now listed after the regular labels. llvm-svn: 262903
* [WebAssembly] Implement support for custom NaN bit patterns.Dan Gohman2016-02-161-2/+3
| | | | llvm-svn: 260968
* [WebAssembly] Enhanced register stackificationDan Gohman2016-01-281-8/+8
| | | | | | | | | | | 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 unaligned loads and stores.Dan Gohman2016-01-261-0/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D16534 llvm-svn: 258779
* [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] Introduce a WebAssemblyTargetStreamer class.Dan Gohman2016-01-121-20/+0
| | | | | | | Refactor .param, .result, .local, and .endfunc, as directives, using the proper MCTargetStreamer mechanism, rather than fake instructions. llvm-svn: 257511
* [WebAssembly] Define OperandTypes for decoding immediate values.Dan Gohman2016-01-121-2/+12
| | | | llvm-svn: 257438
* [WebAssembly] Use TSFlags instead of keeping a list of special-case opcodes.Dan Gohman2016-01-121-3/+14
| | | | llvm-svn: 257433
* [WebAssembly] Remove an unused def : Pat.Dan Gohman2016-01-081-6/+4
| | | | | | | WebAssemblyISelLowering.cpp does not wrap jump table nodes inside of WebAssemblywrapper nodes, so this pattern is not currently used. llvm-svn: 257127
* [WebAssembly] Mark the ARGUMENT pseudo-instructions as CodeGenOnly.Dan Gohman2015-12-211-1/+1
| | | | llvm-svn: 256165
* [WebAssembly] Implement mixed-type ISD::FCOPYSIGN.Dan Gohman2015-12-101-1/+1
| | | | | | | | ISD::FCOPYSIGN permits its operands to have differing types, and DAGCombiner uses this. Add some def : Pat rules to expand this out into an explicit conversion and a normal copysign operation. llvm-svn: 255220
* [WebAssembly] Replace the fake JUMP_TABLE instruction with a def : Pat. NFC.Dan Gohman2015-12-051-5/+2
| | | | llvm-svn: 254864
* [WebAssembly] Implement direct calls to external symbols.Dan Gohman2015-12-051-1/+0
| | | | llvm-svn: 254863
* [WebAssembly] Set several MCInstrDesc flags.Dan Gohman2015-11-291-0/+2
| | | | llvm-svn: 254271
* [WebAssembly] Use a physical register to describe ARGUMENT liveness.Dan Gohman2015-11-251-0/+9
| | | | | | | | | | 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] Codegen support for ISD::ExternalSymbolDan Gohman2015-11-251-2/+4
| | | | llvm-svn: 254075
* [WebAssembly] Don't use set_local instructions explicitly.Dan Gohman2015-11-231-0/+8
| | | | | | | | | 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] Emit .param, .result, and .local through MC.Dan Gohman2015-11-231-0/+5
| | | | | | This eliminates one of the main remaining uses of EmitRawText. llvm-svn: 253878
* [WebAssembly] Rename SWITCH to TABLESWITCH to match the current wording in ↵Dan Gohman2015-11-201-4/+4
| | | | | | the spec. llvm-svn: 253642
* [WebAssembly] Enable register coloring and register stackifying.Dan Gohman2015-11-181-8/+18
| | | | | | | | | | | | | | | | 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] Use tabs instead of spaces in assembly output.Dan Gohman2015-11-151-6/+6
| | | | | | This seems to be the most popular convention among the other backends. llvm-svn: 253172
* [WebAssembly] Rename the Const instructions to be upper-case too.Dan Gohman2015-11-131-4/+4
| | | | llvm-svn: 253072
* [WebAssembly] Rename Immediate instructions to Const.Dan Gohman2015-11-051-12/+12
| | | | | | This more closely reflects the naming convention in the spec. llvm-svn: 252204
* [WebAssembly] Add AsmString strings for most instructions.Dan Gohman2015-11-051-6/+12
| | | | | | | | | Mangling type information into MachineInstr opcode names was a temporary measure, and it's starting to get hairy. At the same time, the MC instruction printer wants to use AsmString strings for printing. This patch takes the first step, starting the process of adding AsmStrings for instructions. llvm-svn: 252203
* [WebAssembly] Rename several functions and types according to the new spec.Dan Gohman2015-09-261-16/+16
| | | | llvm-svn: 248644
* [WebAssembly] Check in an initial CFG Stackifier passDan Gohman2015-09-161-1/+9
| | | | | | | | | | | | 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
* [WebAssembly] Implement calls with void return types.Dan Gohman2015-09-091-4/+8
| | | | llvm-svn: 247158
* WebAssembly: Implement callJF Bastien2015-08-241-2/+24
| | | | | | | | | | | | Summary: Support function calls. Reviewers: sunfish, sunfishcode Subscribers: sunfishcode, jfb, llvm-commits Differential revision: http://reviews.llvm.org/D12219 llvm-svn: 245887
* WebAssembly: print immediatesJF Bastien2015-08-101-0/+10
| | | | | | | | | | | | | | | Summary: For now output using C99's hexadecimal floating-point representation. This patch also cleans up how machine operands are printed: instead of special-casing per type of machine instruction, the code now handles operands generically. Reviewers: sunfish Subscribers: llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11914 llvm-svn: 244520
* WebAssembly: handle more than int32 argument/returnJF Bastien2015-08-011-2/+8
| | | | | | | | | | | | Summary: Also test 64-bit integers, except shifts for now which are broken because isel dislikes the 32-bit truncate that precedes them. Reviewers: sunfish Subscribers: llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11699 llvm-svn: 243822
* WebAssembly: handle `ret void`.JF Bastien2015-07-311-1/+1
| | | | | | | | | | | | | | | Summary: Use -1 as numoperands for the return SDTypeProfile, denoting that return is variadic. Note that the patterns in InstrControl.td still need to match the inputs, so this ins't an "anything goes" variadic on ret! The next step will be to handle other local types (not just int32). Reviewers: sunfish Subscribers: llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11692 llvm-svn: 243783
* WebAssembly: print basic integer assembly.JF Bastien2015-07-311-0/+13
| | | | | | | | | | | | | | | | | | | Summary: This prints assembly for int32 integer operations defined in WebAssemblyInstrInteger.td only, with major caveats: - The operation names are currently incorrect. - Other integer and floating-point types will be added later. - The printer isn't factored out to handle recursive AST code yet, since it can't even handle control flow anyways. - The assembly format isn't full s-expressions yet either, this will be added later. - This currently disables PrologEpilogCodeInserter as well as MachineCopyPropagation becasue they don't like virtual registers, which WebAssembly likes quite a bit. This will be fixed by factoring out NVPTX's change (currently a fork of PrologEpilogCodeInserter). Reviewers: sunfish Subscribers: llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11671 llvm-svn: 243763
* WebAssembly: basic instructions todo, and basic register info.JF Bastien2015-07-101-3/+16
| | | | | | | | | | | | | | Summary: This code is based on AArch64 for modern backend good practice, and NVPTX for virtual ISA concerns. Reviewers: sunfish Subscribers: aemerson, llvm-commits, jfb Differential Revision: http://reviews.llvm.org/D11070 llvm-svn: 241923
* WebAssembly: start instructionsJF Bastien2015-07-011-0/+5
| | | | | | | | | | | | | | | | | | | | Summary: * Add 64-bit address space feature. * Rename SIMD feature to SIMD128. * Handle single-thread model with an IR pass (same way ARM does). * Rename generic processor to MVP, to follow design's lead. * Add bleeding-edge processors, with all features included. * Fix a few DEBUG_TYPE to match other backends. Test Plan: ninja check Reviewers: sunfish Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D10880 llvm-svn: 241211
* [WebAssembly] Initial WebAssembly backendDan Gohman2015-06-291-0/+41
This WebAssembly backend is just a skeleton at this time and is not yet functional. llvm-svn: 241022
OpenPOWER on IntegriCloud