llvm-project/llvm/test/MC/WebAssembly
Thomas Lively 3f34e1b883 [WebAssembly] Merge used feature sets, update atomics linkage policy
Summary:
It does not currently make sense to use WebAssembly features in some functions
but not others, so this CL adds an IR pass that takes the union of all used
feature sets and applies it to each function in the module. This allows us to
prevent atomics from being lowered away if some function has opted in to using
them. When atomics is not enabled anywhere, we detect whether there exists any
atomic operations or thread local storage that would be stripped and disallow
linking with objects that contain atomics if and only if atomics or tls are
stripped. When atomics is enabled, mark it as used but do not require it of
other objects in the link. These changes allow libraries that do not use atomics
to be built once and linked into both single-threaded and multithreaded
binaries.

Reviewers: aheejin, sbc100, dschuff

Subscribers: jgravelle-google, hiraditya, sunfish, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 357226
2019-03-29 00:14:01 +00:00
..
annotations.s [WebAssembly] Remove unneeded MCSymbolRefExpr variants 2019-02-22 22:29:34 +00:00
array-fill.ll [WebAssembly] Merge used feature sets, update atomics linkage policy 2019-03-29 00:14:01 +00:00
assembler-binary.ll [WebAssembly] Merge used feature sets, update atomics linkage policy 2019-03-29 00:14:01 +00:00
atomics-encodings.s [WebAssembly] Fix load/store name detection for atomic instructions 2019-02-20 01:14:36 +00:00
basic-assembly-errors.s [WebAssembly] Make segment/size/type directives optional in asm 2019-02-04 18:03:11 +00:00
basic-assembly.s [WebAssembly] Add support for data sections in the assembler. 2019-03-04 17:18:04 +00:00
blockaddress.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
bss.ll [WebAssembly] Merge used feature sets, update atomics linkage policy 2019-03-29 00:14:01 +00:00
bulk-memory-encodings.s [WebAssembly] memory.fill 2019-02-13 22:25:18 +00:00
comdat.ll [WebAssembly] Merge used feature sets, update atomics linkage policy 2019-03-29 00:14:01 +00:00
compile-twice.ll [WebAssembly] MC: Add compile-twice test and fix corresponding bug 2018-05-30 02:57:20 +00:00
custom-code-section.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
custom-sections.ll [WebAssembly] Parse llvm.ident into producers section 2019-01-17 02:29:55 +00:00
data-section.s [WebAssembly] Add support for data sections in the assembler. 2019-03-04 17:18:04 +00:00
debug-info.ll [WebAssembly] Merge used feature sets, update atomics linkage policy 2019-03-29 00:14:01 +00:00
dwarfdump.ll Fix for llvm-dwarfdump changes for subroutine types 2018-12-12 21:15:48 +00:00
event-section.ll [WebAssembly] Rename relocations from R_WEBASSEMBLY_ to R_WASM_ 2019-02-04 17:28:46 +00:00
explicit-sections.ll [WebAssembly] Merge used feature sets, update atomics linkage policy 2019-03-29 00:14:01 +00:00
external-data.ll [WebAssembly] Remove uses of ThreadModel 2019-02-28 18:39:08 +00:00
external-func-address.ll [WebAssembly] Remove trailing whitespaces in tests (NFC) 2019-03-06 02:00:22 +00:00
file-headers.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
func-address.ll [WebAssembly] Rename relocations from R_WEBASSEMBLY_ to R_WASM_ 2019-02-04 17:28:46 +00:00
function-alias.ll [WebAssembly] MC: Handle aliases of aliases 2019-02-22 21:41:42 +00:00
function-sections.ll [WebAssembly] Remove trailing whitespaces in tests (NFC) 2019-03-06 02:00:22 +00:00
global-ctor-dtor.ll [WebAssembly] Merge used feature sets, update atomics linkage policy 2019-03-29 00:14:01 +00:00
import-module.ll [WebAssembly] Remove trailing whitespaces in tests (NFC) 2019-03-06 02:00:22 +00:00
libcall.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
lit.local.cfg
no-dead-strip.ll [WebAssembly] Add symbol flag to the binary format llvm.used 2019-02-07 01:24:44 +00:00
null-output.s [WebAssembly] MC: Fix for outputing wasm object to /dev/null 2019-01-31 22:38:22 +00:00
objdump.s [WebAssembly] Make disassembler always emit most canonical name. 2019-02-05 01:19:45 +00:00
offset.ll [WebAssembly] Remove trailing whitespaces in tests (NFC) 2019-03-06 02:00:22 +00:00
reloc-code.ll [WebAssembly] Rename relocations from R_WEBASSEMBLY_ to R_WASM_ 2019-02-04 17:28:46 +00:00
reloc-data.ll [WebAssembly] Remove uses of ThreadModel 2019-02-28 18:39:08 +00:00
reloc-pic.s [WebAssembly] Initial implementation of PIC code generation 2019-03-26 19:46:15 +00:00
sections.ll [WebAsembly] Update default triple in test files to wasm32-unknown-unkown. 2018-05-10 17:49:11 +00:00
simd-encodings.s [WebAssembly] Add unimplemented-simd128 subtarget feature 2019-01-10 22:32:11 +00:00
stack-ptr.ll [WebAssembly] Rename relocations from R_WEBASSEMBLY_ to R_WASM_ 2019-02-04 17:28:46 +00:00
types.ll [WebAssembly] Add unimplemented-simd128 subtarget feature 2019-01-10 22:32:11 +00:00
unnamed-data.ll [WebAssembly] Remove trailing whitespaces in tests (NFC) 2019-03-06 02:00:22 +00:00
visibility.ll [WebAssembly] Merge used feature sets, update atomics linkage policy 2019-03-29 00:14:01 +00:00
weak-alias.ll [WebAssembly] Merge used feature sets, update atomics linkage policy 2019-03-29 00:14:01 +00:00
weak.ll [WebAssembly] Merge used feature sets, update atomics linkage policy 2019-03-29 00:14:01 +00:00