From 875646f376f6c83bf8426fdb44e1dbf312cf784e Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Sat, 19 Sep 2009 18:33:36 +0000 Subject: Lett users of sparse propagation do their own thing with phi nodes if they want to. This can be combined with LCSSA or SSI form to store more information on a PHINode than can be computed by looking at its incoming values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82317 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/SparsePropagation.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Analysis/SparsePropagation.cpp') diff --git a/lib/Analysis/SparsePropagation.cpp b/lib/Analysis/SparsePropagation.cpp index 17bb73f991..8a74745dd3 100644 --- a/lib/Analysis/SparsePropagation.cpp +++ b/lib/Analysis/SparsePropagation.cpp @@ -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(); -- cgit v1.2.3