From caa4357cd9677a674bc417d7b6d82cb53a3552b2 Mon Sep 17 00:00:00 2001 From: dolby-oss Date: Fri, 29 Jun 2007 19:15:18 +0000 Subject: [PATCH] fix optmization to check for no phi nodes, rather than just testing for the exit block. when there are lexically-scoped variables in JavaScript code, then the exit block may have phi nodes (required for upward funarg situations) git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1326 f5eafffb-2e1d-0410-98e4-8ec43c5233c4 --- .../callgraph/propagation/SSAPropagationCallGraphBuilder.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/SSAPropagationCallGraphBuilder.java b/com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/SSAPropagationCallGraphBuilder.java index b847d9459..b5d36c06a 100644 --- a/com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/SSAPropagationCallGraphBuilder.java +++ b/com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/propagation/SSAPropagationCallGraphBuilder.java @@ -322,9 +322,7 @@ public abstract class SSAPropagationCallGraphBuilder extends PropagationCallGrap // visit each phi instruction in each successor block for (Iterator sbs = cfg.getSuccNodes(b); sbs.hasNext();) { BasicBlock sb = (BasicBlock) sbs.next(); - if (sb.isExitBlock()) { - // an optimization based on invariant that exit blocks should have no - // phis. + if (! sb.hasPhi()) { continue; } int n = 0;