diff options
author | Ian Lynagh <igloo@earth.li> | 2012-07-24 20:26:52 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-07-24 20:41:06 +0100 |
commit | 229e9fc585b3003f2c26cbcf39f71a87514cd43d (patch) | |
tree | 8214619d18d6d4024dee307435ff9e46d4ee5dbb /compiler/codeGen/CgCallConv.hs | |
parent | 4b18cc53a81634951cc72aa5c3e2123688b6f512 (diff) | |
download | haskell-229e9fc585b3003f2c26cbcf39f71a87514cd43d.tar.gz |
Make -fscc-profiling a dynamic flag
All the flags that 'ways' imply are now dynamic
Diffstat (limited to 'compiler/codeGen/CgCallConv.hs')
-rw-r--r-- | compiler/codeGen/CgCallConv.hs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/codeGen/CgCallConv.hs b/compiler/codeGen/CgCallConv.hs index c65194b62f..332ec0746a 100644 --- a/compiler/codeGen/CgCallConv.hs +++ b/compiler/codeGen/CgCallConv.hs @@ -42,6 +42,7 @@ import Maybes import Id import Name import Util +import DynFlags import StaticFlags import Module import FastString @@ -159,11 +160,11 @@ constructSlowCall amodes -- | 'slowArgs' takes a list of function arguments and prepares them for -- pushing on the stack for "extra" arguments to a function which requires -- fewer arguments than we currently have. -slowArgs :: [(CgRep,CmmExpr)] -> [(CgRep,CmmExpr)] -slowArgs [] = [] -slowArgs amodes - | opt_SccProfilingOn = save_cccs ++ this_pat ++ slowArgs rest - | otherwise = this_pat ++ slowArgs rest +slowArgs :: DynFlags -> [(CgRep,CmmExpr)] -> [(CgRep,CmmExpr)] +slowArgs _ [] = [] +slowArgs dflags amodes + | dopt Opt_SccProfilingOn dflags = save_cccs ++ this_pat ++ slowArgs dflags rest + | otherwise = this_pat ++ slowArgs dflags rest where (arg_pat, args, rest) = matchSlowPattern amodes stg_ap_pat = mkCmmRetInfoLabel rtsPackageId arg_pat |