[PATCH] D28404: IRGen: Add optnone attribute on function during O0
Chandler Carruth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 13 16:02:31 PST 2017
chandlerc added a comment.
Just to be explicit, I agree with Hal's summary. This seems like the right engineering tradeoff and I don't find anything particularly unsatisfying about it.
In https://reviews.llvm.org/D28404#675616, @mehdi_amini wrote:
> Also note that @chandlerc in r290398 made clang adding "noinline" on every function at O0 by default, which seems very similar to what I'm doing here.
>
> We're still waiting for @rsmith to comment whether it'd be better to `have a LangOpts flag that basically means "pragma clang optimize off is always in effect."` and `Have Sema pretend the pragma is in effect at all times, at -O0`.
FWIW, I have no real opinion about this side of it, I see it more as a detail of how Clang wants to implement this kind of thing.
https://reviews.llvm.org/D28404
More information about the cfe-commits
mailing list