[PATCH] Skip promotable allocas to improve performance at -O0

Chandler Carruth chandlerc at google.com
Wed Feb 25 13:04:27 PST 2015


On Mon, Feb 23, 2015 at 4:01 PM, Kostya Serebryany <kcc at google.com> wrote:

> Indeed, Chandler, I actually don't see why this could lead to false
> positives? What do we miss?


I didn't realize that Anna was using the literal 'isAllocaPromotable'
function and nothing else. That much is safe.

That function's name is a bit of a lie, we actually promote wildly more
than what it accepts. That's what got me confused. Looking at the patch,
the comments in the code also seemed confused -- it talks about these being
"unlikely" when it should say "impossible". =]


Meta point: I find the 2 separate review threads very frustrating to follow
at this point though, so if you want further discussion it would be much
more useful to focus it in a single place.


While this patch is a fine initial step, I continue to think that
refactoring this stuff the way I proposed, and handling bounds checks much
as discussed by Nuno and others, is the right long term strategy. The
benefit provided here will be gotten for free as part of that along with
*many* more benefits. I understand that this is much more work, but I don't
want people to stop thinking about this because the easy cases at -O0 have
been handled.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150225/a681c6a1/attachment.html>


More information about the llvm-commits mailing list