diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-03-25 17:25:31 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-04-10 05:31:14 -0400 |
commit | 085983e63bfe6af23f8b85fbfcca8db4872d2f60 (patch) | |
tree | 0d41072c2830e5825f4e6f28c1ed528e29ca54dd /testsuite/tests/regalloc | |
parent | 9c762f27d5468ab692e390b16420c9e304993993 (diff) | |
download | haskell-085983e63bfe6af23f8b85fbfcca8db4872d2f60.tar.gz |
Read constants header instead of global platformConstants
With this patch we switch from reading the globally installed
platformConstants file to reading the DerivedConstants.h header file
that is bundled in the RTS unit. When we build the RTS unit itself, we
get it from its includes directories.
The new parser is more efficient and strict than the Read instance for
PlatformConstants and we get about 2.2MB less allocations in every
cases. However it only really shows in tests that don't allocate much,
hence the following metric decreases.
Metric Decrease:
Naperian
T10421
T10547
T12150
T12234
T12425
T13035
T18304
T18923
T5837
T6048
T18140
Diffstat (limited to 'testsuite/tests/regalloc')
-rw-r--r-- | testsuite/tests/regalloc/regalloc_unit_tests.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/testsuite/tests/regalloc/regalloc_unit_tests.hs b/testsuite/tests/regalloc/regalloc_unit_tests.hs index 496c4dc6a0..b956f2579a 100644 --- a/testsuite/tests/regalloc/regalloc_unit_tests.hs +++ b/testsuite/tests/regalloc/regalloc_unit_tests.hs @@ -64,7 +64,10 @@ main = do --get a GHC context and run the tests runGhc (Just libdir) $ do - dflags <- fmap setOptions getDynFlags + dflags0 <- fmap setOptions getDynFlags + setSessionDynFlags dflags0 + + dflags <- getDynFlags logger <- getLogger reifyGhc $ \_ -> do us <- unitTestUniqSupply |