[PATCH] D29473: [AMDGPU] Unroll preferences improvements

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 18:01:58 PST 2017

rampitec marked an inline comment as done.
rampitec added inline comments.

Comment at: lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:59
+        Type *Ty = Alloca->getAllocatedType();
+        unsigned AllocaSize = Ty->isSized() ? DL.getTypeAllocSize(Ty) : 0;
+        if (AllocaSize > MaxAlloca)
arsenm wrote:
> Can you add a test where isSized is necessary? I thought it was illegal to alloca such a type
It happens when you have opaque type, like image. I doubt I can easily write a test like this, but when it happens getTypeAllocSize() asserts, so it is better to keep it.



More information about the llvm-commits mailing list