diff options
-rw-r--r-- | compiler/cmm/CmmLint.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/cmm/CmmLint.hs b/compiler/cmm/CmmLint.hs index 2e24dd7f82..47c30b1a0f 100644 --- a/compiler/cmm/CmmLint.hs +++ b/compiler/cmm/CmmLint.hs @@ -13,6 +13,7 @@ module CmmLint ( import Hoopl import Cmm import CmmUtils +import CmmLive import PprCmm () import BlockId import FastString @@ -53,7 +54,10 @@ lintCmmDecl (CmmData {}) lintCmmGraph :: CmmGraph -> CmmLint () -lintCmmGraph g = mapM_ (lintCmmBlock labels) blocks +lintCmmGraph g = cmmLiveness g `seq` mapM_ (lintCmmBlock labels) blocks + -- cmmLiveness throws an error if there are registers + -- live on entry to the graph (i.e. undefined + -- variables) where blocks = toBlockList g labels = setFromList (map entryLabel blocks) |