return LatticeFunc->getUntrackedVal();
else if (Constant *C = dyn_cast<Constant>(V))
LV = LatticeFunc->ComputeConstant(C);
+ else if (Argument *A = dyn_cast<Argument>(V))
+ LV = LatticeFunc->ComputeArgument(A);
else if (!isa<Instruction>(V))
- // Non-instructions (e.g. formal arguments) are overdefined.
+ // All other non-instructions are overdefined.
LV = LatticeFunc->getOverdefinedVal();
else
// All instructions are underdefined by default.
if (!KnownFeasibleEdges.insert(Edge(Source, Dest)).second)
return; // This edge is already known to be executable!
+ DOUT << "Marking Edge Executable: " << Source->getNameStart()
+ << " -> " << Dest->getNameStart() << "\n";
+
if (BBExecutable.count(Dest)) {
- DOUT << "Marking Edge Executable: " << Source->getNameStart()
- << " -> " << Dest->getNameStart() << "\n";
-
// The destination is already executable, but we just made an edge
// feasible that wasn't before. Revisit the PHI nodes in the block
// because they have potentially new operands.
}
void SparseSolver::Solve(Function &F) {
- MarkBlockExecutable(F.begin());
+ MarkBlockExecutable(&F.getEntryBlock());
// Process the work lists until they are empty!
while (!BBWorkList.empty() || !InstWorkList.empty()) {