RTS tidyup sweep, first phase
[ghc-hetmet.git] / compiler / main / StaticFlags.hs
index 93ff1a7..b13661e 100644 (file)
@@ -27,7 +27,6 @@ module StaticFlags (
 
        -- profiling opts
        opt_SccProfilingOn,
-       opt_DoTickyProfiling,
 
         -- Hpc opts
        opt_Hpc,
@@ -38,7 +37,6 @@ module StaticFlags (
        opt_Parallel,
 
        -- optimisation opts
-        opt_PassCaseBndrToJoinPoints,
        opt_DsMultiTyVar,
        opt_NoStateHack,
         opt_SimpleListLiterals,
@@ -70,7 +68,6 @@ module StaticFlags (
        opt_HistorySize,
        opt_OmitBlackHoling,
        opt_Unregisterised,
-       opt_EmitExternalCore,
        v_Ld_inputs,
        tablesNextToCode,
         opt_StubDeadValues,
@@ -137,7 +134,7 @@ lookUp     sw = sw `elem` packed_static_opts
 -- (lookup_str "foo") looks for the flag -foo=X or -fooX, 
 -- and returns the string X
 lookup_str sw 
-   = case firstJust (map (maybePrefixMatch sw) staticFlags) of
+   = case firstJust (map (stripPrefix sw) staticFlags) of
        Just ('=' : str) -> Just str
        Just str         -> Just str
        Nothing          -> Nothing     
@@ -197,8 +194,6 @@ opt_NoDebugOutput               = lookUp  (fsLit "-dno-debug-output")
 -- profiling opts
 opt_SccProfilingOn :: Bool
 opt_SccProfilingOn             = lookUp  (fsLit "-fscc-profiling")
-opt_DoTickyProfiling :: Bool
-opt_DoTickyProfiling            = WayTicky `elem` (unsafePerformIO $ readIORef v_Ways)
 
 -- Hpc opts
 opt_Hpc :: Bool
@@ -217,9 +212,6 @@ opt_DsMultiTyVar :: Bool
 opt_DsMultiTyVar               = not (lookUp (fsLit "-fno-ds-multi-tyvar"))
        -- On by default
 
-opt_PassCaseBndrToJoinPoints :: Bool
-opt_PassCaseBndrToJoinPoints   = lookUp  (fsLit "-fpass-case-bndr-to-join-points")
-
 opt_SpecInlineJoinPoints :: Bool
 opt_SpecInlineJoinPoints       = lookUp  (fsLit "-fspec-inline-join-points")
 
@@ -258,7 +250,7 @@ opt_SimplExcessPrecision    = lookUp  (fsLit "-fexcess-precision")
 opt_UF_CreationThreshold :: Int
 opt_UF_CreationThreshold       = lookup_def_int "-funfolding-creation-threshold"  (45::Int)
 opt_UF_UseThreshold :: Int
-opt_UF_UseThreshold            = lookup_def_int "-funfolding-use-threshold"       (8::Int)     -- Discounts can be big
+opt_UF_UseThreshold            = lookup_def_int "-funfolding-use-threshold"       (6::Int)     -- Discounts can be big
 opt_UF_FunAppDiscount :: Int
 opt_UF_FunAppDiscount          = lookup_def_int "-funfolding-fun-discount"        (6::Int)     -- It's great to inline a fn
 opt_UF_KeenessFactor :: Float
@@ -283,14 +275,11 @@ opt_Unregisterised                = lookUp  (fsLit "-funregisterised")
 -- Derived, not a real option.  Determines whether we will be compiling
 -- info tables that reside just before the entry code, or with an
 -- indirection to the entry code.  See TABLES_NEXT_TO_CODE in 
--- includes/InfoTables.h.
+-- includes/rts/storage/InfoTables.h.
 tablesNextToCode :: Bool
 tablesNextToCode               = not opt_Unregisterised
                                  && cGhcEnableTablesNextToCode == "YES"
 
-opt_EmitExternalCore :: Bool
-opt_EmitExternalCore           = lookUp  (fsLit "-fext-core")
-
 -- Include full span info in error messages, instead of just the start position.
 opt_ErrorSpans :: Bool
 opt_ErrorSpans                 = lookUp (fsLit "-ferror-spans")
@@ -327,6 +316,7 @@ data WayName
   = WayThreaded
   | WayDebug
   | WayProf
+  | WayEventLog
   | WayTicky
   | WayPar
   | WayGran
@@ -366,6 +356,7 @@ allowed_combination way = and [ x `allowedWith` y
 
        WayProf `allowedWith` WayNDP            = True
        WayThreaded `allowedWith` WayProf       = True
+       WayThreaded `allowedWith` WayEventLog   = True
        _ `allowedWith` _                       = False
 
 
@@ -432,6 +423,10 @@ way_details =
        , "-DPROFILING"
        , "-optc-DPROFILING" ]),
 
+    (WayEventLog, Way  "l" True "RTS Event Logging"
+       [ "-DEVENTLOG"
+       , "-optc-DEVENTLOG" ]),
+
     (WayTicky, Way  "t" True "Ticky-ticky Profiling"  
        [ "-DTICKY_TICKY"
        , "-optc-DTICKY_TICKY" ]),