llvm-project/llvm/test
Justin Lebar 49fac56ea3 [NVPTX] Allow libcalls that are defined in the current module.
The patch adds a possibility to make library calls on NVPTX.

An important thing about library functions - they must be defined within
the current module. This basically should guarantee that we produce a
valid PTX assembly (without calls to not defined functions). The one who
wants to use the libcalls is probably will have to link against
compiler-rt or any other implementation.

Currently, it's completely impossible to make library calls because of
error LLVM ERROR: Cannot select: i32 = ExternalSymbol '...'. But we can
lower ExternalSymbol to TargetExternalSymbol and verify if the function
definition is available.

Also, there was an issue with a DAG during legalisation. When we expand
instruction into libcall, the inner call-chain isn't being "integrated"
into outer chain. Since the last "data-flow" (call retval load) node is
located in call-chain earlier than CALLSEQ_END node, the latter becomes
a leaf and therefore a dead node (and is being removed quite fast).
Proposed here solution relies on another data-flow pseudo nodes
(ProxyReg) which purpose is only to keep CALLSEQ_END at legalisation and
instruction selection phases - we remove the pseudo instructions before
register scheduling phase.

Patch by Denys Zariaiev!

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

llvm-svn: 350069
2018-12-26 19:12:31 +00:00
..
Analysis [ConstantFolding] Consolidate and extend bitcount intrinsic tests; NFC 2018-12-20 19:46:52 +00:00
Assembler [IR] Don't assume all functions are 4 byte aligned 2018-12-07 08:34:59 +00:00
Bindings [DebugInfo] IR/Bitcode changes for DISubprogram flags. 2018-11-28 21:14:32 +00:00
Bitcode [ThinLTO] Compute synthetic function entry count 2018-12-13 19:54:27 +00:00
BugPoint [bugpoint][PR29027] Reduce function attributes 2018-12-19 03:42:19 +00:00
CodeGen [NVPTX] Allow libcalls that are defined in the current module. 2018-12-26 19:12:31 +00:00
DebugInfo Revert rL350048 and rL350050 2018-12-24 10:30:04 +00:00
Demangle [MS Demangler] Fail gracefully on invalid pointer types. 2018-12-14 18:10:13 +00:00
Examples
ExecutionEngine Implement IMAGE_REL_AMD64_SECREL for RuntimeDyldCOFFX86_64 2018-12-12 00:04:06 +00:00
Feature Mark @llvm.trap cold 2018-11-14 19:53:41 +00:00
FileCheck [FileCheck] Try to fix test on windows due to r349418 2018-12-18 01:17:28 +00:00
Instrumentation [HWASAN] Instrument memorty intrinsics by default 2018-12-24 16:02:48 +00:00
Integer
JitListener
LTO [ThinLTO] Remove dllimport attribute from locally defined symbols 2018-12-19 19:07:45 +00:00
Linker Implement -frecord-command-line (-frecord-gcc-switches) 2018-12-14 15:38:15 +00:00
MC [MC] Enable .file support on COFF and diagnose it on unsupported targets 2018-12-21 23:35:48 +00:00
Object [Object] Deduplicate long archive member names 2018-12-19 16:15:05 +00:00
ObjectYAML [WebAssembly] Check if the section order is correct 2018-12-15 00:58:12 +00:00
Other [NewPM] -print-module-scope -print-after now prints module even after invalidated Loop/SCC 2018-12-21 11:49:05 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen [TableGen] Preserve order of output operands in DAGISelMatcherGen 2018-12-05 00:47:59 +00:00
ThinLTO/X86 Introduce llvm.loop.parallel_accesses and llvm.access.group metadata. 2018-12-20 04:58:07 +00:00
Transforms [LoopSimplifyCFG] Delete dead exiting edges 2018-12-24 07:41:33 +00:00
Unit
Verifier Implement -frecord-command-line (-frecord-gcc-switches) 2018-12-14 15:38:15 +00:00
YAMLParser
tools llvm-dwarfdump: Skip address index info (and dump only the address, if found) when non-verbose dumping addrx forms 2018-12-24 06:52:31 +00:00
.clang-format
CMakeLists.txt
TestRunner.sh
lit.cfg.py [lit]Add llvm-readelf to tool substitutions 2018-12-12 10:34:01 +00:00
lit.site.cfg.py.in