@@ -14,34 +14,36 @@ import Data.Set as S
1414import Options.Applicative
1515
1616data GeneralFlag
17- = Opt_Gibbon1 -- ^ Set Opt_No_RemoveCopies & Opt_BigInfiniteRegions
18- | Opt_Gibbon2 -- ^ Set Opt_RemoveCopies & Opt_InfiniteRegions
19- | Opt_RemoveCopies -- ^ Calls to copy functions are converted to indirections
20- | Opt_No_RemoveCopies -- ^ Unset Opt_RemoveCopies
21- | Opt_InfiniteRegions -- ^ Use infinite regions
22- | Opt_BigInfiniteRegions -- ^ Use big infinite regions
23- | Opt_BenchPrint -- ^ Should the benchamrked function have its output printed?
24- | Opt_Packed -- ^ Use packed representation
25- | Opt_Pointer -- ^ Use pointer representation
26- | Opt_BumpAlloc -- ^ Use bump-pointer allocation if using the non-packed backend
27- | Opt_Warnc -- ^ Show warnings from the C compiler
28- | Opt_DisableGC -- ^ Don't run the the garbage collector (used by Codegen).
29- | Opt_No_PureAnnot -- ^ Don't use 'pure' annotations (a GCC optimization)
30- | Opt_Fusion -- ^ Enable fusion.
31- | Opt_Parallel -- ^ Fork/join parallelism.
32- | Opt_RegionOnSpawn -- ^ Allocate into fresh regions for every spawn, not steal.
33- | Opt_GhcTc -- ^ Typecheck with GHC before compiling with Gibbon.
34- | Opt_RelativeOffsets -- ^ Enable relative offsets.
35- | Opt_CountParRegions -- ^ Count and print the number of regions allocated for parallelism.
36- | Opt_CountAllRegions -- ^ Count and print the number of all the regions allocated.
37- | Opt_RtsDebug -- ^ Compile the RTS in debugging mode.
38- | Opt_PrintGcStats -- ^ Record and print GC statistics.
39- | Opt_GenGc -- ^ Use the new non-generational GC.
40- | Opt_NoEagerPromote -- ^ Disable eager promotion.
41- | Opt_SimpleWriteBarrier -- ^ Disables eliminate-indirection-chains optimization.
42- | Opt_Layout_Local -- ^ Optimize the layout of Algebraic data types locally
43- | Opt_Layout_Global -- ^ Optimize the layout of Algebraic data types globally
44- | Opt_Layout_Use_Solver -- ^ Use the Solver to optimize the layout of the data types.
17+ = Opt_Gibbon1 -- ^ Set Opt_No_RemoveCopies & Opt_BigInfiniteRegions
18+ | Opt_Gibbon2 -- ^ Set Opt_RemoveCopies & Opt_InfiniteRegions
19+ | Opt_RemoveCopies -- ^ Calls to copy functions are converted to indirections
20+ | Opt_No_RemoveCopies -- ^ Unset Opt_RemoveCopies
21+ | Opt_InfiniteRegions -- ^ Use infinite regions
22+ | Opt_BigInfiniteRegions -- ^ Use big infinite regions
23+ | Opt_BenchPrint -- ^ Should the benchamrked function have its output printed?
24+ | Opt_Packed -- ^ Use packed representation
25+ | Opt_Pointer -- ^ Use pointer representation
26+ | Opt_BumpAlloc -- ^ Use bump-pointer allocation if using the non-packed backend
27+ | Opt_Warnc -- ^ Show warnings from the C compiler
28+ | Opt_DisableGC -- ^ Don't run the the garbage collector (used by Codegen).
29+ | Opt_No_PureAnnot -- ^ Don't use 'pure' annotations (a GCC optimization)
30+ | Opt_Fusion -- ^ Enable fusion.
31+ | Opt_Parallel -- ^ Fork/join parallelism.
32+ | Opt_RegionOnSpawn -- ^ Allocate into fresh regions for every spawn, not steal.
33+ | Opt_GhcTc -- ^ Typecheck with GHC before compiling with Gibbon.
34+ | Opt_RelativeOffsets -- ^ Enable relative offsets.
35+ | Opt_CountParRegions -- ^ Count and print the number of regions allocated for parallelism.
36+ | Opt_CountAllRegions -- ^ Count and print the number of all the regions allocated.
37+ | Opt_RtsDebug -- ^ Compile the RTS in debugging mode.
38+ | Opt_PrintGcStats -- ^ Record and print GC statistics.
39+ | Opt_GenGc -- ^ Use the new non-generational GC.
40+ | Opt_NoEagerPromote -- ^ Disable eager promotion.
41+ | Opt_SimpleWriteBarrier -- ^ Disables eliminate-indirection-chains optimization.
42+ | Opt_Layout_Local -- ^ Optimize the layout of Algebraic data types locally
43+ | Opt_Layout_Global -- ^ Optimize the layout of Algebraic data types globally
44+ | Opt_Layout_Use_Solver -- ^ Use the Solver to optimize the layout of the data types.
45+ | Opt_PapiInstrumentation -- ^ Enable PAPI instrumentation while compiling the gibbon binary.
46+
4547 deriving (Show ,Read ,Eq ,Ord )
4648
4749-- | Exactly like GHC's ddump flags.
@@ -120,7 +122,8 @@ dynflagsParser = DynFlags <$> (S.fromList <$> many gflagsParser) <*> (S.fromList
120122 flag' Opt_SimpleWriteBarrier (long " simple-write-barrier" <> help " Disables eliminate-indirection-chains optimization." ) <|>
121123 flag' Opt_Layout_Local (long " opt-layout-local" <> help " Optimizes the Layout of Algebraic data types locally" ) <|>
122124 flag' Opt_Layout_Global (long " opt-layout-global" <> help " Optimizes the Layout of Algebraic data types globally" ) <|>
123- flag' Opt_Layout_Use_Solver (long " opt-layout-use-solver" <> help " Use the solver instead of a Greedy Heuristic" )
125+ flag' Opt_Layout_Use_Solver (long " opt-layout-use-solver" <> help " Use the solver instead of a Greedy Heuristic" ) <|>
126+ flag' Opt_PapiInstrumentation (long " enable-papi" <> help " Enable instrumentation using papi, extends the iterate timing function." )
124127
125128
126129 dflagsParser :: Parser DebugFlag
0 commit comments