[PATCH] D22822: Adjust coercion of aggregates on RenderScript

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 13:28:56 PDT 2016


t.p.northover added a subscriber: t.p.northover.
t.p.northover added a comment.

Are you aware of how inefficient the resulting ABI is once it hits CodeGen? For example using `[3 x i8]` will waste 3 full 64-bit registers for that struct. `struct { char arr[16] };` barely avoids crashing the backend it's so bad (LLVM demotes it to sret at the last moment).

I suppose the real question is why do RenderScript passes need the types to have the same size, and have you really considered all other options? This ABI mangling would be an absolute last resort if I was trying to add support.


================
Comment at: test/CodeGen/renderscript.c:138-139
@@ +137,4 @@
+
+// CHECK-RS32: void @retLong9(%struct.sLong9*
+// CHECK-RS64: void @retLong9(%struct.sLong9*
+sLong9 retLong9() { sLong9 r; return r; }
----------------
Shouldn't these be sret? (And above).


https://reviews.llvm.org/D22822





More information about the llvm-commits mailing list