[llvm] [CanonicalizeFreezeInLoops] fix duplicate removal (PR #74716)
Wei Tao via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 27 19:22:02 PST 2023
================
@@ -99,6 +87,46 @@ class CanonicalizeFreezeInLoopsImpl {
} // anonymous namespace
+namespace llvm {
+
+struct FrozenIndPHIInfo {
+ // A freeze instruction that uses an induction phi
+ FreezeInst *FI = nullptr;
+ // The induction phi, step instruction, the operand idx of StepInst which is
+ // a step value
+ PHINode *PHI;
+ BinaryOperator *StepInst;
+ unsigned StepValIdx = 0;
+
+ FrozenIndPHIInfo(PHINode *PHI, BinaryOperator *StepInst)
+ : PHI(PHI), StepInst(StepInst) {}
+
+ bool operator==(const FrozenIndPHIInfo &Other) { return FI == Other.FI; }
----------------
Friedrich20 wrote:
@nikic,
would you like to give me some hints what to do next with this PR? Do I need to ask someone to merge it or just wait for more reviews?
https://github.com/llvm/llvm-project/pull/74716
More information about the llvm-commits
mailing list