Justin Holewinski
3d140fcfd1
[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.
llvm-svn: 221377
2014-11-05 18:19:30 +00:00
..
2014-06-15 21:40:57 +00:00
2013-07-01 12:59:04 +00:00
2014-04-09 15:39:11 +00:00
2014-04-03 21:18:25 +00:00
2014-01-28 18:35:29 +00:00
2014-06-27 18:35:44 +00:00
2014-07-17 18:10:09 +00:00
2014-07-16 16:26:58 +00:00
2014-07-21 22:54:44 +00:00
2014-06-27 18:35:27 +00:00
2014-03-13 23:18:37 +00:00
2014-11-05 18:19:30 +00:00
2014-07-16 16:26:58 +00:00
2013-11-15 12:30:04 +00:00
2014-07-16 16:26:58 +00:00
2013-09-19 13:14:44 +00:00
2014-07-16 16:26:58 +00:00
2014-07-16 16:26:58 +00:00
2013-06-28 17:58:07 +00:00
2013-07-13 20:38:47 +00:00
2013-06-28 17:58:07 +00:00
2014-01-21 14:40:05 +00:00
2014-06-27 18:35:21 +00:00
2013-07-22 12:18:04 +00:00
2014-07-17 18:10:09 +00:00
2014-07-18 08:30:10 +00:00
2014-07-17 18:10:09 +00:00
2014-07-17 18:10:09 +00:00
2013-06-21 18:51:49 +00:00
2014-06-27 18:36:01 +00:00
2014-07-18 13:01:43 +00:00
2013-06-21 18:51:49 +00:00
2013-08-06 14:13:34 +00:00
2013-06-21 18:51:49 +00:00
2013-07-13 20:38:47 +00:00
2014-06-27 18:35:37 +00:00
2014-07-17 18:10:09 +00:00
2014-06-27 18:36:06 +00:00
2014-07-16 16:26:58 +00:00
2014-07-16 16:26:58 +00:00
2014-06-27 18:35:24 +00:00
2014-07-16 16:26:58 +00:00
2014-07-16 16:26:58 +00:00
2013-12-05 12:58:00 +00:00
2014-08-29 15:30:20 +00:00
2014-08-29 15:30:20 +00:00
2014-08-29 15:30:20 +00:00
2014-06-09 22:42:55 +00:00
2013-06-21 18:51:49 +00:00
2014-07-16 16:26:58 +00:00
2014-10-15 03:27:43 +00:00
2014-06-27 18:35:58 +00:00
2014-07-16 19:45:35 +00:00
2013-07-01 13:00:14 +00:00
2014-07-23 20:23:49 +00:00
2014-03-18 23:51:07 +00:00
2014-06-27 18:36:11 +00:00
2014-07-16 16:26:58 +00:00
2013-06-10 13:29:47 +00:00
2013-10-11 12:39:39 +00:00
2013-06-21 18:51:49 +00:00
2014-06-27 18:35:33 +00:00
2013-07-13 20:38:47 +00:00
2013-07-13 20:38:47 +00:00
2013-07-01 12:58:58 +00:00
2014-06-27 18:35:40 +00:00
2014-07-16 16:26:58 +00:00
2014-07-16 16:26:58 +00:00
2014-07-17 11:59:04 +00:00
2014-04-09 15:39:15 +00:00
2014-07-17 11:59:04 +00:00
2014-04-09 15:39:15 +00:00
2014-03-31 15:56:26 +00:00
2014-07-17 11:59:04 +00:00
2014-07-17 11:59:04 +00:00
2014-07-17 14:51:33 +00:00
2013-11-11 19:28:16 +00:00
2014-01-12 14:09:17 +00:00
2013-06-28 17:57:55 +00:00
2014-07-17 16:58:56 +00:00
2014-10-25 03:46:16 +00:00
2013-07-26 13:28:29 +00:00
2014-06-27 18:35:56 +00:00
2014-06-27 18:35:10 +00:00