| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This fixes non-debug non-assert builds after r293359.
llvm-svn: 293368
|
|
|
|
|
|
| |
Fixes compile failures after r292848
llvm-svn: 292857
|
|
|
|
|
|
|
|
|
| |
WebAssembly varargs functions use a significantly different ABI than
non-varargs functions, and the current code in
WebAssemblyFixFunctionBitcasts doesn't handle that difference. For now,
just avoid creating wrapper functions in the presence of varargs.
llvm-svn: 292645
|
|
|
|
|
|
|
| |
The grow_memory instruction now returns the previous memory size. Add the
return type to the LLVM intrinsic.
llvm-svn: 292322
|
|
|
|
|
|
|
|
|
|
|
| |
Rename from addOperand to just add, to match the other method that has been
added to MachineInstrBuilder for adding more than just 1 operand.
See https://reviews.llvm.org/D28057 for the whole discussion.
Differential Revision: https://reviews.llvm.org/D28556
llvm-svn: 291891
|
|
|
|
|
|
|
|
|
|
|
|
| |
updated instructions:
pmulld, pmullw, pmulhw, mulsd, mulps, mulpd, divss, divps, divsd, divpd, addpd and subpd.
special optimization case which replaces pmulld with pmullw\pmulhw\pshuf seq.
In case if the real operands bitwidth <= 16.
Differential Revision: https://reviews.llvm.org/D28104
llvm-svn: 291657
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we collect 2 uses of a function in FindUses and then RAUW when we
visit the first, we end up visiting the wrapper (because the second was
RAUW'd). We still want to use RAUW instead of just Use->set() because
it has special handling for Constants, so this patch just ensures that
only one use of each constant is added to the work list.
Differential Revision: https://reviews.llvm.org/D28504
llvm-svn: 291603
|
|
|
|
| |
llvm-svn: 291498
|
|
|
|
| |
llvm-svn: 291424
|
|
|
|
|
|
|
|
| |
Gracefully leave code that performs function-pointer bitcasts implying
non-trivial pointer conversions alone, rather than aborting, since it's
just undefined behavior.
llvm-svn: 291326
|
|
|
|
| |
llvm-svn: 291324
|
|
|
|
|
|
|
|
|
|
|
|
| |
WebAssembly requires caller and callee signatures to match exactly. In LLVM,
there are a variety of circumstances where signatures may be mismatched in
practice, and one can bitcast a function address to another type to call it
as that type. This patch adds a pass which replaces bitcasted function
addresses with wrappers to replace the bitcasts.
This doesn't catch everything, but it does match many common cases.
llvm-svn: 291315
|
|
|
|
|
|
| |
These will be used to guide the binary encoding of these immediates.
llvm-svn: 290412
|
|
|
|
| |
llvm-svn: 290345
|
|
|
|
| |
llvm-svn: 290344
|
|
|
|
|
|
|
| |
WebAssembly's load/store offsets are unsigned and don't wrap, so it's not
valid to fold in a negative offset.
llvm-svn: 290342
|
|
|
|
| |
llvm-svn: 290281
|
|
|
|
|
|
|
| |
Use the target triple to determine whether to run the explicit-locals
pass, rather than using a separate command-line argument.
llvm-svn: 288602
|
|
|
|
|
|
|
| |
Fix a warning about a comparison between signed and unsigned integer
expressions.
llvm-svn: 288532
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type.
Instead, expose whether the current type is an array or a struct, if an array
what the upper bound is, and if a struct the struct type itself. This is
in preparation for a later change which will make PointerType derive from
Type rather than SequentialType.
Differential Revision: https://reviews.llvm.org/D26594
llvm-svn: 288458
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support a new assembler directive, .import_global, to declare imported
global variables (i.e. those with external linkage and no
initializer). The linker turns these into wasm imports.
Patch by Jacob Gravelle
Differential Revision: https://reviews.llvm.org/D26875
llvm-svn: 288296
|
|
|
|
|
|
| |
This patch updates a bunch of places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system.
llvm-svn: 287206
|
|
|
|
|
|
|
|
|
|
| |
Since IMPLIFIT_DEF instructions are omitted in the output, when the output
of an IMPLICIT_DEF instruction is stackified, the resulting register lacks
an explicit push, leading to a push/pop mismatch. Fix this by converting
such IMPLICIT_DEFs into CONST_I32 0 instructions so that they have explicit
pushes.
llvm-svn: 286274
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because we shift the stack pointer by an unknown amount, we need an
additional pointer. In the case where we have variable-size objects
as well, we can't reuse the frame pointer, thus three pointers.
Patch by Jacob Gravelle
Differential Revision: https://reviews.llvm.org/D26263
llvm-svn: 286160
|
|
|
|
|
|
|
|
| |
Update the README.txt with newer information, add a link to the Emscripten
page explaining the current easiest way to use the LLVM wasm backend, and
mention that other ways of using the LLVM wasm backend are in development.
llvm-svn: 285215
|
|
|
|
|
|
|
| |
call_indirect, grow_memory, and current_memory now have immediate
operands in the 0xd binary encoding.
llvm-svn: 285085
|
|
|
|
|
|
|
|
| |
Patch by Sam McCall!
Differential Revision: https://reviews.llvm.org/D25934
llvm-svn: 285055
|
|
|
|
|
|
|
| |
The p2align operand of a load/store is encoded before the offset
operand; reorder the MachineInstr operands accordingly.
llvm-svn: 285044
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes locals from being declared by the emitLocal hook in
WebAssemblyTargetStreamer, rather than with an instruction. After exploring
the infastructure in LLVM more, this seems to make more sense since
declaring locals doesn't use an encoded opcode.
This also adds more 0xd opcodes, type encodings, and miscellaneous
binary encoding bits.
llvm-svn: 285040
|
|
|
|
| |
llvm-svn: 285017
|
|
|
|
|
|
|
| |
CFGStackify differentiates between END_LOOP and END_BLOCK, but wasm
itself doesn't. For now, just use the same opcode for both.
llvm-svn: 285016
|
|
|
|
|
|
| |
This corresponds to the "0xd" opcode renumbering.
llvm-svn: 285014
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a pass, controlled by an option and off by default for
now, for making implicit get_local/set_local explicit. This simplifies
emitting wasm with MC.
Differential Revision: https://reviews.llvm.org/D25836
llvm-svn: 285009
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Need to reorder the operands to have the callee as the last argument.
Adds a pseudo-instruction, and a pass to lower it into a real
call_indirect.
This is the first of two options for how to fix the problem.
Reviewers: dschuff, sunfish
Subscribers: jfb, beanz, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D25708
llvm-svn: 284840
|
|
|
|
|
|
|
|
|
|
| |
All of these existed because MSVC 2013 was unable to synthesize default
move ctors. We recently dropped support for it so all that error-prone
boilerplate can go.
No functionality change intended.
llvm-svn: 284721
|
|
|
|
| |
llvm-svn: 283723
|
|
|
|
|
|
|
|
| |
This avoids "static initialization order fiasco"
Differential Revision: https://reviews.llvm.org/D25412
llvm-svn: 283702
|
|
|
|
|
|
|
|
|
| |
Per spec changes, this implements block signatures, and adds just enough
logic to produce correct block signatures at the ends of functions.
Differential Revision: https://reviews.llvm.org/D25144
llvm-svn: 283503
|
|
|
|
|
|
|
|
| |
Per spec changes, loop constructs no longer have a bottom label.
https://reviews.llvm.org/D25118
llvm-svn: 283502
|
|
|
|
|
|
|
|
|
| |
Per spec changes, store instructions in WebAssembly no longer have a return
value. Update the instruction descriptions.
Differential Revision: https://reviews.llvm.org/D25122
llvm-svn: 283501
|
|
|
|
| |
llvm-svn: 283389
|
|
|
|
|
|
|
|
| |
WebAssembly has officially switched from being an AST to being a stack
machine. Update various bits of terminology and README.md entries
accordingly.
llvm-svn: 283154
|
|
|
|
|
|
| |
The comment is present inside the body of GetVRegDef.
llvm-svn: 283153
|
|
|
|
| |
llvm-svn: 283150
|
|
|
|
| |
llvm-svn: 283147
|
|
|
|
|
|
|
| |
WebAssembly documentation consistently says "f32" rather than "fp32" to
describe 32-bit floating-point.
llvm-svn: 283146
|
|
|
|
| |
llvm-svn: 283004
|
|
|
|
|
|
|
|
|
|
|
|
| |
Register stackification currently checks VNInfo for changes. Make that
more accurate by testing each intervening instruction for any other defs
to the same virtual register.
Patch by Jacob Gravelle
Differential Revision: https://reviews.llvm.org/D24942
llvm-svn: 282886
|
|
|
|
|
|
|
|
|
|
|
| |
When we have dynamic allocas we have a frame pointer, and
when we're lowering frame indexes we should make sure we use it.
Patch by Jacob Gravelle
Differential Revision: https://reviews.llvm.org/D24889
llvm-svn: 282442
|
|
|
|
| |
llvm-svn: 281535
|