[llvm] [NewGVN] Set parent to the temporal instructions that are generated during phi-of-ops optimization (PR #66314)

Konstantina Mitropoulou via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 18:32:03 PDT 2023


================
@@ -2666,6 +2671,7 @@ Value *NewGVN::findLeaderForInst(Instruction *TransInst,
   TempToBlock.insert({TransInst, PredBB});
   InstrDFS.insert({TransInst, IDFSNum});
 
+  PhiOfOpsCandidate = TransInst;
----------------
kmitropoulou wrote:

You are right :) This is set every time that we process one of the operands of the new phi node. After that, I do not initialize to nullptr. Anyway, it is not needed any more.

https://github.com/llvm/llvm-project/pull/66314


More information about the llvm-commits mailing list