[PATCH] D20077: [Inliner] don't assume that a Constant alloca size is a ConstantInt (PR27277)
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 13:36:01 PDT 2016
spatel added inline comments.
================
Comment at: lib/Analysis/InlineCost.cpp:335
@@ -337,1 +334,3 @@
+ if (ConstantInt *AllocSize = dyn_cast_or_null<ConstantInt>(
+ SimplifiedValues.lookup(I.getArraySize()))) {
Type *Ty = I.getAllocatedType();
----------------
joker.eph wrote:
> We're losing the assertion, that could be seen as somehow not totally useless: if the only special case is undef, maybe it could be spelled out explicitly?
> (I'm not having a strong opinion either way)
I've never looked at alloca or this file before, but that seems reasonable (it can't be FP or vector). Let me update the patch.
http://reviews.llvm.org/D20077
More information about the llvm-commits
mailing list