summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r--compiler/main/DynFlags.hs12
1 files changed, 10 insertions, 2 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index dcdc4b556d..dded24fba3 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -799,7 +799,12 @@ data DynFlags = DynFlags {
rtldInfo :: IORef (Maybe LinkerInfo),
-- | Run-time compiler information
- rtccInfo :: IORef (Maybe CompilerInfo)
+ rtccInfo :: IORef (Maybe CompilerInfo),
+
+ -- Constants used to control the amount of optimization done.
+
+ -- ^ Max size, in bytes, of inline array allocations.
+ maxInlineAllocSize :: Int
}
class HasDynFlags m where
@@ -1448,7 +1453,9 @@ defaultDynFlags mySettings =
avx512f = False,
avx512pf = False,
rtldInfo = panic "defaultDynFlags: no rtldInfo",
- rtccInfo = panic "defaultDynFlags: no rtccInfo"
+ rtccInfo = panic "defaultDynFlags: no rtccInfo",
+
+ maxInlineAllocSize = 128
}
defaultWays :: Settings -> [Way]
@@ -2428,6 +2435,7 @@ dynamic_flags = [
, Flag "fmax-worker-args" (intSuffix (\n d -> d {maxWorkerArgs = n}))
, Flag "fghci-hist-size" (intSuffix (\n d -> d {ghciHistSize = n}))
+ , Flag "fmax-inline-alloc-size" (intSuffix (\n d -> d{ maxInlineAllocSize = n }))
------ Profiling ----------------------------------------------------