[PATCH] D61665: [TailCall] Disable tail call if the callee function contain __builtin_frame_address or __builtin_return_address
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 13:55:47 PDT 2019
efriedma added a comment.
I have a few concerns here:
1. Looping over every instruction in a function is expensive, and makes any pass which checks this for every call in a function take quadratic time overall.
2. You can't inspect the body of a function pointer, or a function in a different translation unit, so we can't make this work consistently.
3. Even in the same translation unit, how do we "preserve" the behavior for values greater than 1?
------
I'd prefer to just leave the current behavior if it isn't causing any practical problems. The user can always use -fno-optimize-sibling-calls if their codebase needs it for some reason.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61665/new/
https://reviews.llvm.org/D61665
More information about the llvm-commits
mailing list