diff options
| author | Ian Lynagh <ian@well-typed.com> | 2012-08-06 22:51:28 +0100 |
|---|---|---|
| committer | Ian Lynagh <ian@well-typed.com> | 2012-08-06 22:51:28 +0100 |
| commit | e6ef5ab66f51a8b821a4ae8646faca19cf600d94 (patch) | |
| tree | 0ac8f5178caa80f1fabc3da22e46db8cb19a553a /compiler/cmm/CmmOpt.hs | |
| parent | 8e7fb28fc89eb9b99c747698f41995c269cd1090 (diff) | |
| download | haskell-e6ef5ab66f51a8b821a4ae8646faca19cf600d94.tar.gz | |
Make tablesNextToCode "dynamic"
This is a bit odd by itself, but it's a stepping stone on the way to
putting "target unregisterised" into the settings file.
Diffstat (limited to 'compiler/cmm/CmmOpt.hs')
| -rw-r--r-- | compiler/cmm/CmmOpt.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/cmm/CmmOpt.hs b/compiler/cmm/CmmOpt.hs index 09cbf5045d..5f208244f8 100644 --- a/compiler/cmm/CmmOpt.hs +++ b/compiler/cmm/CmmOpt.hs @@ -21,7 +21,6 @@ import OldPprCmm import CmmNode (wrapRecExp) import CmmUtils import DynFlags -import StaticFlags import CLabel import UniqFM @@ -672,10 +671,10 @@ exactLog2 x_ except factorial, but what the hell. -} -cmmLoopifyForC :: RawCmmDecl -> RawCmmDecl +cmmLoopifyForC :: DynFlags -> RawCmmDecl -> RawCmmDecl -- XXX: revisit if we actually want to do this -- cmmLoopifyForC p@(CmmProc Nothing _ _) = p -- only if there's an info table, ignore case alts -cmmLoopifyForC (CmmProc infos entry_lbl +cmmLoopifyForC dflags (CmmProc infos entry_lbl (ListGraph blocks@(BasicBlock top_id _ : _))) = -- pprTrace "jump_lbl" (ppr jump_lbl <+> ppr entry_lbl) $ CmmProc infos entry_lbl (ListGraph blocks') @@ -686,10 +685,10 @@ cmmLoopifyForC (CmmProc infos entry_lbl = CmmBranch top_id do_stmt stmt = stmt - jump_lbl | tablesNextToCode = toInfoLbl entry_lbl - | otherwise = entry_lbl + jump_lbl | tablesNextToCode dflags = toInfoLbl entry_lbl + | otherwise = entry_lbl -cmmLoopifyForC top = top +cmmLoopifyForC _ top = top -- ----------------------------------------------------------------------------- -- Utils |
