[PATCH] D125321: [InstCombine] Freeze other uses of frozen value
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 10 11:35:44 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:3816
- bool Changed = false;
+ // Find the nearest common dominator of all uses of Op.
+ Instruction *Dom = nullptr;
----------------
mtrofin wrote:
> wouldn't going to the def of `Op` be sufficient and compile-time cheaper?
Yes, that would work as well. The reason I went for the nearest common dominator is to avoid hoisting the freeze more than necessary, e.g. out of a loop. Though now that I write that, LICM would do that anyway, so probably that concern doesn't make sense.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125321/new/
https://reviews.llvm.org/D125321
More information about the llvm-commits
mailing list