[PATCH] D144927: [GVNHoist] don't hoist callbr users into the callbr's block
Aditya Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 10:52:29 PST 2023
hiraditya added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/GVNHoist.cpp:819
+ // the use above the def.
+ if (is_contained(T->users(), Insn))
+ continue;
----------------
hiraditya wrote:
> I'm assuming there are only a few `T->users` in practice, otherwise linear search on users could be slow.
maybe we can check if `Insn` has any operands that are defined by `T`
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