summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly
Commit message (Collapse)AuthorAgeFilesLines
...
* [WebAssembly] Trim unneeded #includes. NFC.Dan Gohman2015-12-222-2/+0
| | | | llvm-svn: 256301
* [WebAssembly] Minor code simplification. NFC.Dan Gohman2015-12-221-1/+1
| | | | llvm-svn: 256300
* [WebAssembly] Convert a regular for loop to a range-based for loop.Dan Gohman2015-12-211-2/+1
| | | | llvm-svn: 256169
* [WebAssembly] Clean up comments and fix a missing #include dependency.Dan Gohman2015-12-211-13/+7
| | | | llvm-svn: 256168
* [WebAssembly] Remove an unneeded empty destructor.Dan Gohman2015-12-211-4/+0
| | | | llvm-svn: 256167
* [WebAssembly] Enclose the operand variables for load and store instructions ↵Dan Gohman2015-12-211-23/+23
| | | | | | | | | in braces. This allows the AsmMatcherEmitter to properly tokenize the AsmStrings for load and store instructions. This is a step towards asm parsing. llvm-svn: 256166
* [WebAssembly] Mark the ARGUMENT pseudo-instructions as CodeGenOnly.Dan Gohman2015-12-211-1/+1
| | | | llvm-svn: 256165
* [WebAssembly] Add some comments and make some minor source cleanups.Dan Gohman2015-12-211-3/+4
| | | | llvm-svn: 256164
* Remove unused class variables.Eric Christopher2015-12-171-5/+3
| | | | llvm-svn: 255939
* [WebAssembly] Switch WebAssemblyMCAsmInfo.h from MCAsmInfo to MCAsmInfoELF.Dan Gohman2015-12-171-2/+2
| | | | llvm-svn: 255925
* Fix unused variable warning in release builds. NFC.Diego Novillo2015-12-171-3/+1
| | | | llvm-svn: 255897
* [WebAssembly] Convert WebAssemblyTargetObjectFile to TargetLoweringObjectFileELFDan Gohman2015-12-174-42/+30
| | | | llvm-svn: 255877
* [WebAssembly] Experimental ELF writer supportDan Gohman2015-12-178-12/+291
| | | | | | | | | This creates the initial infrastructure for writing ELF output files. It doesn't yet have any implementation for encoding instructions. Differential Revision: http://reviews.llvm.org/D15555 llvm-svn: 255869
* WebAssembly: update expected torture test failuresJF Bastien2015-12-171-14/+0
| | | | | | We now have 240 expected failures. llvm-svn: 255858
* [WebAssembly] Fix legalization of shift operators on large integer types.Dan Gohman2015-12-161-0/+7
| | | | llvm-svn: 255847
* [WebAssembly] Implement eliminateCallFramePseudoDerek Schuff2015-12-166-31/+58
| | | | | | | | | | | | | | | | | | Summary: Implement eliminateCallFramePsuedo to handle ADJCALLSTACKUP/DOWN pseudo-instructions. Add a test calling a vararg function which causes non-0 adjustments. This revealed an issue with RegisterCoalescer wherein it eliminates a COPY from SP32 to a vreg but failes to update the live ranges of EXPR_STACK, causing a machineinstr verifier failure (so this test is commented out). Also add a dynamic alloca test, which causes a callseq_end dag node with a 0 (instead of undef) second argument to be generated. We currently fail to select that, so adjust the ADJCALLSTACKUP tablegen code to handle it. Differential Revision: http://reviews.llvm.org/D15587 llvm-svn: 255844
* Remove now-unused includeDerek Schuff2015-12-161-1/+0
| | | | llvm-svn: 255817
* Iterate over phys regs insteadDerek Schuff2015-12-162-4/+10
| | | | llvm-svn: 255816
* [WebAssembly] Print an extra local decl when the user stack pointer is usedDerek Schuff2015-12-161-0/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D15546 llvm-svn: 255815
* [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] Use the new offset syntax for memory operands in inline asm.Dan Gohman2015-12-161-1/+3
| | | | llvm-svn: 255788
* [WebAssembly] Support more kinds of inline asm operandsDan Gohman2015-12-161-4/+24
| | | | llvm-svn: 255782
* [WebAssembly] Implement instruction selection for constant offsets in addresses.Dan Gohman2015-12-154-24/+385
| | | | | | | | | | | | | | | | | | | | 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: update expected torture test failuresJF Bastien2015-12-151-33/+0
| | | | | | We now have 252 expected failures. llvm-svn: 255654
* [WebAssembly] Use an immediate OperandType for offset operands.Dan Gohman2015-12-151-23/+23
| | | | llvm-svn: 255612
* [WebAssembly] Remove .import printing.Dan Gohman2015-12-151-58/+0
| | | | | | | For now, LLVM doesn't know about wasm module imports, so it shouldn't emit .import directives. llvm-svn: 255602
* [WebAssembly] Add type prefixes to call instructionsDan Gohman2015-12-141-7/+7
| | | | | | | | | Add return type information to call and call_indirect instructions. This allows them to be disambiguated without knowledge of the callee. Differential Revision: http://reviews.llvm.org/D15484 llvm-svn: 255565
* [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] Avoid adding redundant EXPR_STACK uses.Dan Gohman2015-12-141-3/+4
| | | | llvm-svn: 255563
* [WebAssembly] Add an assert to sanity-check dead flags.Dan Gohman2015-12-141-0/+3
| | | | | | | The WebAssemblyStoreResults pass runs before LiveVariables, so it doesn't expect to have to keep dead flags up to date; check this with an assert. llvm-svn: 255551
* [WebAssembly] Update test expectationsDerek Schuff2015-12-121-108/+49
| | | | | | | | | Many tests are now passing due to eliminateFrameIndex implementation and the list needs to be re-triaged because it unblocks other failures, and some previous failures are different. However I'm about to churn it more by implementing more lowering, so will wait on that. llvm-svn: 255396
* [WebAssembly] Implement prolog/epilog insertion and FrameIndex eliminationDerek Schuff2015-12-1111-19/+1233
| | | | | | | | | | | | | | | | | | Summary: Use the SP32 physical register as the base for FrameIndex lowering. Update it and the __stack_pointer global var in the prolog and epilog. Extend the mapping of virtual registers to wasm locals to include the physical registers. Rather than modify the target-independent PrologEpilogInserter (which asserts that there are no virtual registers left) include a slightly-modified copy for Wasm that does not have this assertion and only clears the virtual registers if scavenging was needed (which of course it isn't for wasm). Differential Revision: http://reviews.llvm.org/D15344 llvm-svn: 255392
* [WebAssembly] Fix ADJCALLSTACKDOWN/UP use/defsDerek Schuff2015-12-112-5/+10
| | | | | | | | | | | | | | | | | | | | | | Summary: ADJCALLSTACK{DOWN,UP} (aka CALLSEQ_{START,END}) MIs are supposed to use and def the stack pointer. Since they do not, all the nodes are being eliminated by DeadMachineInstructionElim, so they aren't in the IR when PrologEpilogInserter/eliminateCallFramePseudo needs them. This change fixes that, but since RegStackify will not stackify across them (and it runs early, before PEI), change LowerCall to only emit them when the call frame size is > 0. That makes the current code work the same way and makes code handled by D15344 also work the same way. We can expand the condition beyond NumBytes > 0 in the future if needed. Reviewers: sunfish, jfb Subscribers: jfb, dschuff, llvm-commits Differential Revision: http://reviews.llvm.org/D15459 llvm-svn: 255356
* [WebAssembly] Make WebAssemblyStoreResults only return true when it has a ↵Dan Gohman2015-12-101-1/+3
| | | | | | change. llvm-svn: 255253
* [WebAssembly] Fix WebAssemblyPeephole to set Changed to true when making ↵Dan Gohman2015-12-101-0/+1
| | | | | | changes. llvm-svn: 255252
* [WebAssembly] Declare that WebAssemblyPeephole does not modify the CFG.Dan Gohman2015-12-101-0/+5
| | | | llvm-svn: 255251
* [WebAssembly] Remove an unneeded getAnalysisUsage override.Dan Gohman2015-12-101-4/+0
| | | | llvm-svn: 255250
* [WebAssembly] Implement mixed-type ISD::FCOPYSIGN.Dan Gohman2015-12-102-1/+7
| | | | | | | | 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] Implement fma.Dan Gohman2015-12-101-1/+1
| | | | | | It is lowered to a libcall for now, but this is expected to change in the future. llvm-svn: 255219
* [WebAssembly] Fix legalization of f32->f64 EXTLOAD.Dan Gohman2015-12-101-1/+1
| | | | llvm-svn: 255202
* [WebAssembly] Update known test failuresDerek Schuff2015-12-101-10/+1
| | | | | | We can now select sign_extend_inreg llvm-svn: 255197
* [WebAssembly] Also legalize sign_extend_inreg of i32->i64.Dan Gohman2015-12-101-1/+1
| | | | llvm-svn: 255191
* [WebAssembly] Update test failure expectationsDerek Schuff2015-12-101-28/+10
| | | | llvm-svn: 255190
* [WebAssembly] Fix legalization of shift operators with illegal types.Dan Gohman2015-12-101-1/+7
| | | | llvm-svn: 255181
* [WebAssembly] Fix copy+pastos.Dan Gohman2015-12-101-12/+12
| | | | llvm-svn: 255180
* [WebAssembly] Implement anyext.Dan Gohman2015-12-101-0/+9
| | | | llvm-svn: 255179
* [WebAssembly] Reintroduce ARGUMENT moving logicDan Gohman2015-12-094-0/+116
| | | | | | | | | | | | | | | | | | | Reinteroduce the code for moving ARGUMENTS back to the top of the basic block. While the ARGUMENTS physical register prevents sinking and scheduling from moving them, it does not appear to be sufficient to prevent SelectionDAG from moving them down in the initial schedule. This patch introduces a patch that moves them back to the top immediately after SelectionDAG runs. This is still hopefully a temporary solution. http://reviews.llvm.org/D14750 is one alternative, though the review has not been favorable, and proposed alternatives are longer-term and have other downsides. This fixes the main outstanding -verify-machineinstrs failures, so it adds -verify-machineinstrs to several tests. Differential Revision: http://reviews.llvm.org/D15377 llvm-svn: 255125
* WebAssembly: add missing failure to the list.JF Bastien2015-12-091-0/+1
| | | | llvm-svn: 255119
* WebAssembly: add known failuresJF Bastien2015-12-092-2/+444
| | | | | | The bots are now running the torture tests properly. Bin all failures from the GCC C torture tests so that we can tackle failures and make the tree go red on regressions. llvm-svn: 255111
* [WebAssembly] Fix a typo in a comment.Dan Gohman2015-12-081-1/+1
| | | | llvm-svn: 254999
OpenPOWER on IntegriCloud