[PATCH] D29473: [AMDGPU] Unroll preferences improvements

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 17:54:50 PST 2017

arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.

LGTM except for the isSized question

Comment at: lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:59
+        Type *Ty = Alloca->getAllocatedType();
+        unsigned AllocaSize = Ty->isSized() ? DL.getTypeAllocSize(Ty) : 0;
+        if (AllocaSize > MaxAlloca)
Can you add a test where isSized is necessary? I thought it was illegal to alloca such a type

Comment at: lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:67
+          const Instruction *Inst = dyn_cast<Instruction>(Op);
+          if (Inst ==nullptr || L->isLoopInvariant(Op))
+            continue;



More information about the llvm-commits mailing list