| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Refactoring changed paramHasAttr(1 + i) to paramHasAttr(0), fix that to
paramHasAttr(i).
Add more tests to WebAssemblyOptimizeReturned that catch that
regression.
Reviewers: dschuff
Subscribers: jfb, sbc100, llvm-commits
Differential Revision: https://reviews.llvm.org/D32136
llvm-svn: 300502
|
|
|
|
|
|
|
|
| |
Use SLEB (varint) for block_type immediates in accordance with the spec.
Patch by Yury Delendik
llvm-svn: 300490
|
|
|
|
| |
llvm-svn: 300479
|
|
|
|
|
|
|
|
|
| |
This avoids the confusing 'CS.paramHasAttr(ArgNo + 1, Foo)' pattern.
Previously we were testing return value attributes with index 0, so I
introduced hasReturnAttr() for that use case.
llvm-svn: 300367
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add hasParamAttribute() and use it instead of hasAttribute(ArgNo+1,
Kind) everywhere.
The fact that the AttributeList index for an argument is ArgNo+1 should
be a hidden implementation detail.
NFC
llvm-svn: 300272
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This seems like a much more natural API, based on Derek Schuff's
comments on r300015. It further hides the implementation detail of
AttributeList that function attributes come last and appear at index
~0U, which is easy for the user to screw up. git diff says it saves code
as well: 97 insertions(+), 137 deletions(-)
This also makes it easier to change the implementation, which I want to
do next.
llvm-svn: 300153
|
|
|
|
|
|
| |
This fixes the failing WebAssemblyLowerEmscriptenEHSjLj tests
llvm-svn: 300072
|
|
|
|
|
|
|
|
| |
This reverts commit 2a0eb61dcccb15058d5b2a572bb3da0cf47fd550, r300015
I raced with rnk on the commit.
llvm-svn: 300016
|
|
|
|
|
|
| |
This fixes the failing WebAssemblyLowerEmscriptenEHSjLj tests
llvm-svn: 300015
|
|
|
|
| |
llvm-svn: 299736
|
|
|
|
| |
llvm-svn: 299535
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for the new relocations and linking metadata section support in
https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md. In
particular, this allows LLVM to indicate which variable is the stack pointer,
so that it can be linked with other objects.
This also adds support for emitting type relocations for call_indirect
instructions.
Right now, this is mainly tested by using wabt and hexdump to examine the
output on selected testcases. We'll add more tests as the design stablizes
and more of the pieces are in place.
llvm-svn: 299141
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This class is a list of AttributeSetNodes corresponding the function
prototype of a call or function declaration. This class used to be
called ParamAttrListPtr, then AttrListPtr, then AttributeSet. It is
typically accessed by parameter and return value index, so
"AttributeList" seems like a more intuitive name.
Rename AttributeSetImpl to AttributeListImpl to follow suit.
It's useful to rename this class so that we can rename AttributeSetNode
to AttributeSet later. AttributeSet is the set of attributes that apply
to a single function, argument, or return value.
Reviewers: sanjoy, javed.absar, chandlerc, pete
Reviewed By: pete
Subscribers: pete, jholewinski, arsenm, dschuff, mehdi_amini, jfb, nhaehnle, sbc100, void, llvm-commits
Differential Revision: https://reviews.llvm.org/D31102
llvm-svn: 298393
|
|
|
|
| |
llvm-svn: 298106
|
|
|
|
|
|
|
|
|
|
|
|
| |
A recent change switch the in-memory wasm value types
to be signed integers, but I missing a few cases where
these were being writing to the binary.
Differential Revision: https://reviews.llvm.org/D31014
Patch by Sam Clegg
llvm-svn: 297991
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we were using the encoded LEB hex values
for the value types. This change uses the decoded
negative value and the LEB encoder to write them out.
Differential Revision: https://reviews.llvm.org/D30847
Patch by Sam Clegg
llvm-svn: 297777
|
|
|
|
| |
llvm-svn: 297420
|
|
|
|
|
|
|
|
|
|
|
| |
target.
To facilitate this, add a new hidden command-line option to disable
the explicit-locals pass. That causes llc to emit invalid code that doesn't
have all locals converted to get_local/set_local, however it simplifies
testwriting in many cases.
llvm-svn: 296540
|
|
|
|
| |
llvm-svn: 296402
|
|
|
|
|
|
|
| |
CFG sorting was already an independent algorithm from block/loop insertion;
this change makes it more convenient to debug.
llvm-svn: 296399
|
|
|
|
|
|
|
| |
This replaces the __stack_pointer variable which was allocated in linear
memory.
llvm-svn: 296201
|
|
|
|
|
|
|
|
|
| |
With the "wasm32-unknown-unknown-wasm" triple, this allows writing out
simple wasm object files, and is another step in a larger series toward
migrating from ELF to general wasm object support. Note that this code
and the binary format itself is still experimental.
llvm-svn: 296190
|
|
|
|
| |
llvm-svn: 296172
|
|
|
|
| |
llvm-svn: 296095
|
|
|
|
|
|
|
|
|
|
| |
LLVM CodeGen emits references to external symbols that are never declared in
LLVM IR level, so they have no declared signature. However, WebAssembly requires
all functions be declared with signatures. This patch adds a table for providing
signatures for known runtime libcalls that will be used in subsequent patches to
emit declarations for such functions.
llvm-svn: 295857
|
|
|
|
| |
llvm-svn: 295850
|
|
|
|
|
|
|
|
|
| |
This just adds the basic skeleton for supporting a new object file format.
All of the actual encoding will be implemented in followup patches.
Differential Revision: https://reviews.llvm.org/D26722
llvm-svn: 295803
|
|
|
|
|
|
| |
for now.
llvm-svn: 295327
|
|
|
|
|
|
|
| |
Remove support for disassembling an old experimental wasm binary format, which
is no longer in use anywhere.
llvm-svn: 294809
|
|
|
|
| |
llvm-svn: 294679
|
|
|
|
|
|
| |
NFC.
llvm-svn: 294652
|
|
|
|
| |
llvm-svn: 293922
|
|
|
|
|
|
| |
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
|