[PATCH] D144927: [GVNHoist] don't hoist callbr users into the callbr's block
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 6 02:34:38 PST 2023
bjope added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/GVNHoist.cpp:817
continue;
+ if (IsCallBrTerminated &&
+ std::find(T->user_begin(), T->user_end(), Insn) != T->user_end())
----------------
I guess CallBrInst is the only terminator that may define values today, but who knows about the future. So it would be nice generalize this somehow, i.e. not explicitly checking if the Terminator is a CallBrInst but rather checking if the terminator is a def.
Maybe we could just skip the IsCallBrTerminated check?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144927/new/
https://reviews.llvm.org/D144927
More information about the llvm-commits
mailing list