[PATCH] D132623: [CodeGen] Disable tail calls at -O0/-O1
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 7 13:46:07 PDT 2022
aeubanks added a comment.
The contract we have with the -O1 pipeline is to attempt to generate debuggable code as much as possible. For that reason I don't think the frontend should be responsible for adding the attribute.
As for a separate pass adding the attribute vs checking the opt level in the various isels, I like a separate pass better because it's more explicit and less magical, plus I'd have to go and touch all the various isels. Touching all the isels isn't a huge deal but it makes it easier to regress with future changes ("forgot to check opt level on top of `disable-tail-calls`"), and I'd have to make sure to not miss anything in the first place. Having only one way for a backend to check for disabling tail calls seems nicer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132623/new/
https://reviews.llvm.org/D132623
More information about the llvm-commits
mailing list