summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-03-16 16:46:39 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-04-21 06:39:32 -0400
commit747093b7c23a1cf92b564eb3d9efe2adc15330df (patch)
tree06b74ab72984f98036a40fc441d37438a49a26a8 /testsuite
parentf2a98996e7792f572ab685f29742e3476be81166 (diff)
downloadhaskell-747093b7c23a1cf92b564eb3d9efe2adc15330df.tar.gz
CmmToAsm DynFlags refactoring (#17957)
* Remove `DynFlags` parameter from `isDynLinkName`: `isDynLinkName` used to test the global `ExternalDynamicRefs` flag. Now we test it outside of `isDynLinkName` * Add new fields into `NCGConfig`: current unit id, sse/bmi versions, externalDynamicRefs, etc. * Replace many uses of `DynFlags` by `NCGConfig` * Moved `BMI/SSE` datatypes into `GHC.Platform`
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/regalloc/regalloc_unit_tests.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/testsuite/tests/regalloc/regalloc_unit_tests.hs b/testsuite/tests/regalloc/regalloc_unit_tests.hs
index a7e93259ca..efe955414c 100644
--- a/testsuite/tests/regalloc/regalloc_unit_tests.hs
+++ b/testsuite/tests/regalloc/regalloc_unit_tests.hs
@@ -26,6 +26,8 @@ import qualified GHC.CmmToAsm.X86.Instr as X86.Instr
import GHC.Driver.Main
import GHC.StgToCmm.CgUtils
import GHC.CmmToAsm
+import GHC.CmmToAsm.Config
+import GHC.CmmToAsm.Monad as NCGConfig
import GHC.Cmm.Info.Build
import GHC.Cmm.Pipeline
import GHC.Cmm.Parser
@@ -97,13 +99,13 @@ assertIO = assertOr $ \msg -> void (throwIO . RegAllocTestException $ msg)
compileCmmForRegAllocStats ::
DynFlags ->
FilePath ->
- (DynFlags ->
+ (NCGConfig ->
NcgImpl (Alignment, RawCmmStatics) X86.Instr.Instr X86.Instr.JumpDest) ->
UniqSupply ->
IO [( Maybe [Color.RegAllocStats (Alignment, RawCmmStatics) X86.Instr.Instr]
, Maybe [Linear.RegAllocStats])]
compileCmmForRegAllocStats dflags' cmmFile ncgImplF us = do
- let ncgImpl = ncgImplF dflags
+ let ncgImpl = ncgImplF (NCGConfig.initConfig dflags)
hscEnv <- newHscEnv dflags
-- parse the cmm file and output any warnings or errors