[PATCH] D28404: IRGen: Add optnone attribute on function during O0
Paul Robinson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 9 14:28:18 PST 2017
probinson added a comment.
In https://reviews.llvm.org/D28404#640314, @mehdi_amini wrote:
> In https://reviews.llvm.org/D28404#640284, @probinson wrote:
> > Upfront, it seemed peculiar to handle only one optimization level. After more thought, the whole idea of mixing -O0 and LTO seems wrong. Sorry, should have signaled that I had changed my mind about it.
> You just haven't articulated 1) why it is wrong and 2) what should we do about it.
"Optimize without optimizing" really? Does not sound confused to you? Persuade me why it makes sense.
If it doesn't make sense, then yes making the `-O0 -flto` combination an error would be the right path.
Unless you are taking the position that `-flto` doesn't mean "use LTO" and instead means something else, like "emit bitcode" in which case you should be advocating to change the name of the option to say what it means.
More information about the cfe-commits