Lett users of sparse propagation do their own thing with phi nodes if they want
[oota-llvm.git] / lib / Analysis / SparsePropagation.cpp
index 17bb73f991e48f2ea3e5849f4ce577cb37ea5e88..8a74745dd3fb62c379f3e9bbc0079117fd10234d 100644 (file)
@@ -223,6 +223,13 @@ void SparseSolver::visitTerminatorInst(TerminatorInst &TI) {
 }
 
 void SparseSolver::visitPHINode(PHINode &PN) {
+  if (LatticeFunc->IsSpecialCasedPHI(&PN)) {
+    LatticeVal IV = LatticeFunc->ComputeInstructionState(PN, *this);
+    if (IV != LatticeFunc->getUntrackedVal())
+      UpdateState(PN, IV);
+    return;
+  }
+
   LatticeVal PNIV = getOrInitValueState(&PN);
   LatticeVal Overdefined = LatticeFunc->getOverdefinedVal();