History log of /llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp (Results 26 – 40 of 40)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2
# 5f8f34e4 01-May-2018 Adrian Prantl <aprantl@apple.com>

Remove \brief commands from doxygen comments.

We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they ar

Remove \brief commands from doxygen comments.

We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by

for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done

Differential Revision: https://reviews.llvm.org/D46290

llvm-svn: 331272

show more ...


Revision tags: llvmorg-6.0.1-rc1
# 40926451 30-Mar-2018 Jacob Gravelle <jgravelle@google.com>

[WebAssembly] Register wasm passes with the PassRegistry

Summary:
This exposes WebAssembly passes for use on the command line (as
arguments to -print-before and the like).

Reviewers: dschuff, sunfi

[WebAssembly] Register wasm passes with the PassRegistry

Summary:
This exposes WebAssembly passes for use on the command line (as
arguments to -print-before and the like).

Reviewers: dschuff, sunfish

Subscribers: MatzeB, jfb, sbc100, llvm-commits, aheejin

Differential Revision: https://reviews.llvm.org/D45103

llvm-svn: 328901

show more ...


Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1
# 3a762bf9 08-Dec-2017 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Reapply r319186: "Support bitcasted function addresses with varargs."

This puts the functionality under control of a command-line option which is
off by default to avoid breaking exist

[WebAssembly] Reapply r319186: "Support bitcasted function addresses with varargs."

This puts the functionality under control of a command-line option which is
off by default to avoid breaking existing setups.

llvm-svn: 320197

show more ...


# 6736f590 08-Dec-2017 Dan Gohman <dan433584@gmail.com>

[WebAssemby] Re-apply r320041: "Support main functions with alternate signatures."

This includes a fix so that it doesn't transform declarations, and it
puts the functionality under control of a com

[WebAssemby] Re-apply r320041: "Support main functions with alternate signatures."

This includes a fix so that it doesn't transform declarations, and it
puts the functionality under control of a command-line option which is off
by default to avoid breaking existing setups.

llvm-svn: 320196

show more ...


# 9e1baeda 08-Dec-2017 Derek Schuff <dschuff@google.com>

Revert "[WebAssemby] Support main functions with alternate signatures."

This reverts commit 959e37e669b0c3cfad4cb9f1f7c9261ce9f5e9ae.
That commit doesn't handle the case where main is declared rathe

Revert "[WebAssemby] Support main functions with alternate signatures."

This reverts commit 959e37e669b0c3cfad4cb9f1f7c9261ce9f5e9ae.
That commit doesn't handle the case where main is declared rather than defined,
in particular the even-more special case where main is a prototypeless
declaration (which is of course the one actually used by musl currently).

llvm-svn: 320121

show more ...


# cdaa87dd 07-Dec-2017 Dan Gohman <dan433584@gmail.com>

[WebAssemby] Support main functions with alternate signatures.

WebAssembly requires caller and callee signatures to match, so the usual
C runtime trick of calling main and having it just work regard

[WebAssemby] Support main functions with alternate signatures.

WebAssembly requires caller and callee signatures to match, so the usual
C runtime trick of calling main and having it just work regardless of
whether main is defined as '()' or '(int argc, char *argv[])' doesn't
work. Extend the FixFunctionBitcasts pass to rewrite main to use the
latter form.

llvm-svn: 320041

show more ...


Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3
# 78c19d60 30-Nov-2017 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Revert r319186 "Support bitcasted function addresses with varargs."

The patch broke Emscripten's EM_ASM macros, which utiltize unprototyped
functions.

See https://bugs.llvm.org/show_b

[WebAssembly] Revert r319186 "Support bitcasted function addresses with varargs."

The patch broke Emscripten's EM_ASM macros, which utiltize unprototyped
functions.

See https://bugs.llvm.org/show_bug.cgi?id=35385 for details.

llvm-svn: 319452

show more ...


Revision tags: llvmorg-5.0.1-rc2
# 2803bfaf 28-Nov-2017 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Support bitcasted function addresses with varargs.

Generalize FixFunctionBitcasts to handle varargs functions. This in
particular fixes the case where clang bitcasts away a varargs whe

[WebAssembly] Support bitcasted function addresses with varargs.

Generalize FixFunctionBitcasts to handle varargs functions. This in
particular fixes the case where clang bitcasts away a varargs when
calling a K&R-style function.

This avoids interacting with tricky ABI details because it operates
at the LLVM IR level before varargs ABI details are exposed.

This fixes PR35385.

llvm-svn: 319186

show more ...


Revision tags: llvmorg-5.0.1-rc1
# 37af00e7 10-Oct-2017 Jacob Gravelle <jgravelle@google.com>

[WebAssembly] Narrow the scope of WebAssemblyFixFunctionBitcasts

Summary:
The pass to fix function bitcasts generates thunks for functions that
are called directly with a mismatching signature. It w

[WebAssembly] Narrow the scope of WebAssemblyFixFunctionBitcasts

Summary:
The pass to fix function bitcasts generates thunks for functions that
are called directly with a mismatching signature. It was also generating
thunks in cases where the function was address-taken, causing aliasing
problems in otherwise valid cases.
This patch tightens the restrictions for when the pass runs.

Reviewers: sunfish, dschuff

Subscribers: jfb, sbc100, llvm-commits, aheejin

Differential Revision: https://reviews.llvm.org/D38640

llvm-svn: 315326

show more ...


Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3, llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3
# d37dc2f7 27-Feb-2017 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Add some comments and tidy up whitespace.

llvm-svn: 296402


Revision tags: llvmorg-4.0.0-rc2
# a99b717f 20-Jan-2017 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Don't create bitcast-wrappers for varargs.

WebAssembly varargs functions use a significantly different ABI than
non-varargs functions, and the current code in
WebAssemblyFixFunctionBit

[WebAssembly] Don't create bitcast-wrappers for varargs.

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

show more ...


Revision tags: llvmorg-4.0.0-rc1
# 7acb42a4 10-Jan-2017 Derek Schuff <dschuff@google.com>

[WebAssembly] Only RAUW a constant once in FixFunctionBitcasts

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 sec

[WebAssembly] Only RAUW a constant once in FixFunctionBitcasts

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

show more ...


# 0e2ceb81 07-Jan-2017 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Don't abort on code with UB.

Gracefully leave code that performs function-pointer bitcasts implying
non-trivial pointer conversions alone, rather than aborting, since it's
just undefin

[WebAssembly] Don't abort on code with UB.

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

show more ...


# d5eda355 07-Jan-2017 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Move a SmallVector to a more specific scope. NFC.

llvm-svn: 291324


# 1b637458 07-Jan-2017 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Add a pass to create wrappers for function bitcasts.

WebAssembly requires caller and callee signatures to match exactly. In LLVM,
there are a variety of circumstances where signatures

[WebAssembly] Add a pass to create wrappers for function bitcasts.

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

show more ...


12