[PATCH] D109759: [llvm-reduce] Skip updating calls where OldF isn't the called fn.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 14 07:09:15 PDT 2021
fhahn added a comment.
In D109759#2999593 <https://reviews.llvm.org/D109759#2999593>, @lebedev.ri wrote:
> What if we are calling bitcasted OldF?
It's undefined behavior, so that's not great.
But already we replace all remaining uses of the old function with a bitcast'd version of the new function, so it shouldn't make things worse much. E.g. I think even without this patch, we could have something like 'store OldF', 'load the stored fn' and call it. Or a no-op bit cast of OldF which is then passed to a call. Or a const global array which contains OldF. Those instances would have the same issue when replacing OldF with the bitcast'd version of NewF.
I guess we could skip replacing functions if there are non-call users, but that might be a bit limiting in terms of reduction power. Or keep around the old function as declaration or something.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109759/new/
https://reviews.llvm.org/D109759
More information about the llvm-commits
mailing list