diff options
Diffstat (limited to 'CodeGen.hs')
-rw-r--r-- | CodeGen.hs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -16,6 +16,7 @@ import AST import Defs import Intermediate import qualified LifetimeAnalysis as LA +import qualified LifetimeAnalysisOld as LAO import RegAlloc import ReplaceRefs import Utils @@ -106,7 +107,10 @@ codegenFunc (IRFunc _ name al bbs sid) = do alltemprefs = uniq $ sort $ map LA.unAccess $ concat $ concat $ map fst temprefsperbb lifespans = map (\r -> (findLifeSpan r, r)) alltemprefs where findLifeSpan ref = - fromJust $ findFirstLast id $ concat $ LA.lifetimeAnalysis ref temprefsperbb + let la = LA.lifetimeAnalysis ref temprefsperbb + lao = LAO.lifetimeAnalysis ref temprefsperbb + in (if la == lao then id else traceShow (ref,bbs,la,lao)) $ + fromJust $ findFirstLast id $ concat $ LA.lifetimeAnalysis ref temprefsperbb aliascandidates = findAliasCandidates bbs :: [(Ref, Ref)] |