[PATCH] D14148: [GlobalOpt] Demote globals to locals more aggressively

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 07:53:27 PST 2015


Hi,
On 16 Nov 2015, at 15:49, Mehdi Amini <mehdi.amini at apple.com<mailto:mehdi.amini at apple.com>> wrote:

So there will be cases where we will regress in the optimization for “main()”, when we can’t prove that the pointer is dead on entry. I don’t think it really matters that much in practice though, but it may look bad on some benchmarks.

That is true.

We could bake in some knowledge about main again for this? Now that main can be marked norecurse it’s slightly less of a massive bug to hardcode “main is only called once”, although it’d be a pity to reintroduce that layering violation again!

James

________________________________

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151116/13bef740/attachment.html>


More information about the llvm-commits mailing list