Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a dyn flag to enable SoA #273

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gibbon-compiler/src/Gibbon/Compiler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions gibbon-compiler/src/Gibbon/DynFlags.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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") <|>
Expand Down
Loading