Regarding the FIXME: no tests fail if I remove the 'AllocatedSize' line completely.
Details
Diff Detail
Event Timeline
lib/Analysis/InlineCost.cpp | ||
---|---|---|
335 | 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? | |
337 | Indeed... My impression is that this is the kind of things that can only be reliably tested using a c++ unitest. I doubt that InlineCost has much unittest coverage though. |
lib/Analysis/InlineCost.cpp | ||
---|---|---|
335 | 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. |
lib/Analysis/InlineCost.cpp | ||
---|---|---|
335 | This is wrong. This could will crash if it is a ConstantExpr. |
Thanks!
Do you plan to act on the FIXME?
I would if I knew where the test should go. If you want to handle that, I'll watch and learn. :)
Patch updated:
Back to the original version - if it's not a ConstantInt, we ignore it.
Patch updated:
Use 'auto' with dyn_cast_or_null.
Also, keep the original 'Size' var because the 80-col forced formatting for the alternative is ugly.
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)