[PATCH] D37879: [TargetTransformInfo] Instruction alloca has 0 cost
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 18:12:45 PDT 2017
hfinkel added inline comments.
================
Comment at: include/llvm/Analysis/TargetTransformInfoImpl.h:743
+ if (isa<AllocaInst>(U))
+ return TTI::TCC_Free;
----------------
This needs a comment. Also, I think this is only true for static allocas. Dynamic ones will still have a cost. Maybe this should be:
if (auto *A = dyn_cast<AllocaInst>(U))
if (A->isStaticAlloca())
return TTI::TTC_Free;
https://reviews.llvm.org/D37879
More information about the llvm-commits
mailing list