llvm-6502/lib
Justin Holewinski e459c0bf65 [NVPTX] Add NVPTXLowerStructArgs pass
This works around the limitation that PTX does not allow .param space
loads/stores with arbitrary pointers.

If a function has a by-val struct ptr arg, say foo(%struct.x *byval %d), then
add the following instructions to the first basic block :

%temp = alloca %struct.x, align 8
%tt1 = bitcast %struct.x * %d to i8 *
%tt2 = llvm.nvvm.cvt.gen.to.param %tt2
%tempd = bitcast i8 addrspace(101) * to %struct.x addrspace(101) *
%tv = load %struct.x addrspace(101) * %tempd
store %struct.x %tv, %struct.x * %temp, align 8

The above code allocates some space in the stack and copies the incoming
struct from param space to local space. Then replace all occurences of %d
by %temp.

Fixes PR21465.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221377 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-05 18:19:30 +00:00
..
Analysis remove extra breaks; NFC 2014-11-05 18:00:07 +00:00
AsmParser X86: Implement the vectorcall calling convention 2014-10-28 01:29:26 +00:00
Bitcode IR: MDNode => Value: Instruction::getAllMetadataOtherThanDebugLoc() 2014-11-03 18:13:57 +00:00
CodeGen IR: MDNode => Value: NamedMDNode::getOperator() 2014-11-05 18:16:03 +00:00
DebugInfo [dwarfdump] Dump DW_AT_ranges values inline in the debug_info dump. 2014-10-23 04:08:34 +00:00
ExecutionEngine [JIT] Fix some more missing endian conversions in RuntimeDyld 2014-11-01 15:52:31 +00:00
IR IR: MDNode => Value: NamedMDNode::getOperator() 2014-11-05 18:16:03 +00:00
IRReader Pass a && to getLazyBitcodeModule. 2014-09-03 17:31:46 +00:00
LineEditor
Linker IR: MDNode => Value: NamedMDNode::getOperator() 2014-11-05 18:16:03 +00:00
LTO Add an option to the LTO code generator to disable vectorization during LTO 2014-10-26 21:50:58 +00:00
MC Don't produce relocations for a difference in a section with no symbols. 2014-11-04 22:10:33 +00:00
Object llvm-readobj: Add support for dumping the DOS header in PE files 2014-11-05 06:24:35 +00:00
Option Add an overload of getLastArgNoClaim taking two OptSpecifiers. 2014-09-12 19:42:53 +00:00
ProfileData Use ErrorOr for the ::create factory on instrumented and sample profilers. 2014-11-03 00:51:45 +00:00
Support llvm-readobj: Add support for dumping the DOS header in PE files 2014-11-05 06:24:35 +00:00
TableGen Eliminate some deep std::vector copies. NFC. 2014-10-03 18:33:16 +00:00
Target [NVPTX] Add NVPTXLowerStructArgs pass 2014-11-05 18:19:30 +00:00
Transforms IR: MDNode => Value: NamedMDNode::getOperator() 2014-11-05 18:16:03 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile