[llvm] [CanonicalizeFreezeInLoops] fix duplicate removal (PR #74716)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 22 07:08:57 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; }
----------------
nikic wrote:
This function looks unused / unnecessary?
https://github.com/llvm/llvm-project/pull/74716
More information about the llvm-commits
mailing list