diff options
Diffstat (limited to 'compiler/GHC/CmmToAsm/CFG.hs')
-rw-r--r-- | compiler/GHC/CmmToAsm/CFG.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/CmmToAsm/CFG.hs b/compiler/GHC/CmmToAsm/CFG.hs index 8f8b71b1f7..99df21c46b 100644 --- a/compiler/GHC/CmmToAsm/CFG.hs +++ b/compiler/GHC/CmmToAsm/CFG.hs @@ -1350,7 +1350,7 @@ calcFreqs graph backEdges loops revPostOrder = runST $ do vcat (map (\(k,m) -> ppr (k,m :: IM.IntMap Double)) $ IM.toList g) ) - nodeCount = IM.foldl' (\count toMap -> IM.foldlWithKey' countTargets count toMap) (IM.size graph) graph + nodeCount = IM.foldl' (\count toMap -> IM.foldlWithKey' countTargets (count + 1) toMap) 0 graph where countTargets = (\count k _ -> countNode k + count ) countNode n = if IM.member n graph then 0 else 1 |