diff --git a/gibbon-compiler/src/Gibbon/Compiler.hs b/gibbon-compiler/src/Gibbon/Compiler.hs index 7a26220f..e24877e9 100644 --- a/gibbon-compiler/src/Gibbon/Compiler.hs +++ b/gibbon-compiler/src/Gibbon/Compiler.hs @@ -634,6 +634,7 @@ addRedirectionCon p@Prog{ddefs} = do passes :: (Show v) => Config -> L0.Prog0 -> StateT (CompileState v) IO L4.Prog passes config@Config{dynflags} l0 = do let isPacked = gopt Opt_Packed dynflags + isSoA = gopt Opt_Packed_SoA dynflags biginf = gopt Opt_BigInfiniteRegions dynflags gibbon1 = gopt Opt_Gibbon1 dynflags no_rcopies = gopt Opt_No_RemoveCopies dynflags diff --git a/gibbon-compiler/src/Gibbon/DynFlags.hs b/gibbon-compiler/src/Gibbon/DynFlags.hs index 31d709f4..07aa553e 100644 --- a/gibbon-compiler/src/Gibbon/DynFlags.hs +++ b/gibbon-compiler/src/Gibbon/DynFlags.hs @@ -39,6 +39,7 @@ data GeneralFlag | Opt_GenGc -- ^ Use the new generational GC. | Opt_NoEagerPromote -- ^ Disable eager promotion. | Opt_SimpleWriteBarrier -- ^ Disables eliminate-indirection-chains optimization. + | Opt_Packed_SoA -- ^ Use packed representation but use a structure of arrays representation for the datatype deriving (Show,Read,Eq,Ord) -- | Exactly like GHC's ddump flags. @@ -114,9 +115,10 @@ dynflagsParser = DynFlags <$> (S.fromList <$> many gflagsParser) <*> (S.fromList flag' Opt_PrintGcStats (long "print-gc-stats" <> short 'S' <> help "Record and print GC statistics.") <|> flag' Opt_GenGc (long "gen-gc" <> help "Use the new generational GC.") <|> flag' Opt_NoEagerPromote (long "no-eager-promote" <> help "Disable eager promotion.") <|> - flag' Opt_SimpleWriteBarrier (long "simple-write-barrier" <> help "Disables eliminate-indirection-chains optimization.") - - + flag' Opt_SimpleWriteBarrier (long "simple-write-barrier" <> help "Disables eliminate-indirection-chains optimization.") <|> + flag' Opt_Packed_SoA (long "SoA" <> + help "Use a structure of arrays representation for all datatypes.") + dflagsParser :: Parser DebugFlag dflagsParser = flag' Opt_D_Dump_Repair (long "ddump-repair" <> help "Dump some information while running RepairProgram") <|>