llvm-project/llvm/test
James Y Knight 19f6cce4e3 Add __atomic_* lowering to AtomicExpandPass.
(Recommit of r266002, with r266011, r266016, and not accidentally
including an extra unused/uninitialized element in LibcallRoutineNames)

AtomicExpandPass can now lower atomic load, atomic store, atomicrmw, and
cmpxchg instructions to __atomic_* library calls, when the target
doesn't support atomics of a given size.

This is the first step towards moving all atomic lowering from clang
into llvm. When all is done, the behavior of __sync_* builtins,
__atomic_* builtins, and C11 atomics will be unified.

Previously LLVM would pass everything through to the ISelLowering
code. There, unsupported atomic instructions would turn into __sync_*
library calls. Because of that behavior, Clang currently avoids emitting
llvm IR atomic instructions when this would happen, and emits __atomic_*
library functions itself, in the frontend.

This change makes LLVM able to emit __atomic_* libcalls, and thus will
eventually allow clang to depend on LLVM to do the right thing.

It is advantageous to do the new lowering to atomic libcalls in
AtomicExpandPass, before ISel time, because it's important that all
atomic operations for a given size either lower to __atomic_*
libcalls (which may use locks), or native instructions which won't. No
mixing and matching.

At the moment, this code is enabled only for SPARC, as a
demonstration. The next commit will expand support to all of the other
targets.

Differential Revision: http://reviews.llvm.org/D18200

llvm-svn: 266115
2016-04-12 20:18:48 +00:00
..
Analysis Support arbitrary addrspace pointers in masked load/store intrinsics 2016-04-12 15:58:04 +00:00
Assembler Support arbitrary addrspace pointers in masked load/store intrinsics 2016-04-12 15:58:04 +00:00
Bindings [OCaml] Expose the LLVM diagnostic handler 2016-04-10 13:55:53 +00:00
Bitcode [Bitcode] Fix + regenerate old test so that it includes a DICompileUnit. 2016-04-12 15:51:23 +00:00
BugPoint Add a missing DICompileUnit to testcase. 2016-04-11 23:30:29 +00:00
CodeGen [WebAssembly] Fix debug info in reg-stackify.ll test 2016-04-12 20:12:05 +00:00
DebugInfo Fix some display bugs in llvm-pdbdump. 2016-04-11 20:39:17 +00:00
Examples
ExecutionEngine Disable the new Orc lazy JIT tests on Windows, they do not pass 2016-02-10 18:46:42 +00:00
Feature [NVVM] Remove noduplicate attribute from synchronizing intrinsics. 2016-03-22 22:08:01 +00:00
FileCheck Reapply r262092: [FileCheck] Abort if -NOT is combined with another suffix. 2016-02-29 22:13:03 +00:00
Instrumentation [sancov] enabling coverage edge pruning by default. 2016-04-06 23:24:37 +00:00
Integer
JitListener testcase gardening: update the emissionKind enum to the new syntax. (NFC) 2016-04-01 00:16:49 +00:00
LTO Refactor the Internalize stage of libLTO in a separate file (NFC) 2016-04-12 06:34:10 +00:00
LibDriver
Linker ThinLTO renaming: use module hash instead of position in the summary 2016-04-11 23:26:46 +00:00
MC [mips] add assembler support for .set arch=octeon 2016-04-12 15:28:16 +00:00
Object Revert r265817 2016-04-08 18:15:37 +00:00
Other [CG] Add a new pass manager printer pass for the old call graph and 2016-03-10 11:24:11 +00:00
SymbolRewriter
TableGen [GlobalISel][Target] Add an opcode for unconditional branch. 2016-03-11 17:27:38 +00:00
ThinLTO/X86 ThinLTO: special handling for LinkOnce functions 2016-04-01 21:53:50 +00:00
Transforms Add __atomic_* lowering to AtomicExpandPass. 2016-04-12 20:18:48 +00:00
Unit [lit] Hack lit to allow a test suite to request that it is run "early". 2016-03-12 03:03:31 +00:00
Verifier [IR/Verifier] Each DISubprogram with isDefinition: true must belong to a CU. 2016-04-12 18:22:33 +00:00
YAMLParser
tools [llvm-readobj] Add ELF hash histogram printing 2016-04-11 17:15:30 +00:00
.clang-format
CMakeLists.txt Moving llvm-test-depends and test-depends into the Tests folder; NFC, this simply cleans up the generated solution so that these targets don't live in the root folder of the IDE. 2016-04-12 15:09:14 +00:00
TestRunner.sh
lit.cfg test: Always treat .mir files as tests even outside of CodeGen/MIR 2016-04-04 21:23:44 +00:00
lit.site.cfg.in