Regarding the FIXME: no tests fail if I remove the 'AllocatedSize' line completely.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Analysis/InlineCost.cpp | ||
---|---|---|
335 ↗ | (On Diff #56608) | 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 ↗ | (On Diff #56608) | 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 ↗ | (On Diff #56608) | 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 ↗ | (On Diff #56621) | 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.