================ @@ -873,19 +874,26 @@ class DataflowAnalysis { llvm::SmallBitVector Visited(Cfg.getNumBlockIDs() + 1); while (const CFGBlock *B = W.dequeue()) { - Lattice StateIn = getInState(B); + Lattice StateIn = *getInState(B); Lattice StateOut = transferBlock(B, StateIn); OutStates[B] = StateOut; - Visited.set(B->getBlockID()); for (const CFGBlock *AdjacentB : isForward() ? B->succs() : B->preds()) { if (!AdjacentB) continue; - Lattice OldInState = getInState(AdjacentB); - Lattice NewInState = D.join(OldInState, StateOut); + Lattice OldInState; + bool SawFirstTime = false; + Lattice NewInState; + if (const Lattice *In = getInState(AdjacentB)) { ---------------- Xazax-hun wrote:
Wouldn't it be simpler if `getInState` always returned a valid state? Just defaulted to `D.getInitialState` when the lookup fail. https://github.com/llvm/llvm-project/pull/159991 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits