Dear Community,
I’m trying to implement optimization described in PR26223 and meet the following bail out condition in CodeGenPrepare::optimizeMemoryInst.
// Break use-def graph loops.
if (!Visited.insert(V).second) {
Consensus = nullptr;
break;
}
So while traversing thorough phi nodes from memory instruction to find addr mode we bail out if we meet some instruction twice.
Does anybody know/remember what is the reason for this checks.
From the first glance it seems that it will be ok if we just mark it as visited and continue processing worklist.
I did this change and make check passed.
So I seek for a help to explain this decision.
Thank you in advance,
Serguei.