summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-06-03 20:46:05 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-18 22:12:13 -0400
commit0c5ed5c7eb30bc5462b67ff097c3388597265a4b (patch)
treed55e420625a2118c7854d2b41bb4ee4ed5755b7f /testsuite
parentaa4b744d51aa6bdb46064f981ea8e001627921d6 (diff)
downloadhaskell-0c5ed5c7eb30bc5462b67ff097c3388597265a4b.tar.gz
DynFlags: refactor GHC.CmmToAsm (#17957, #10143)
This patch removes the use of `sdocWithDynFlags` from GHC.CmmToAsm.*.Ppr To do that I've had to make some refactoring: * X86' and PPC's `Instr` are no longer `Outputable` as they require a `Platform` argument * `Instruction` class now exposes `pprInstr :: Platform -> instr -> SDoc` * as a consequence, I've refactored some modules to avoid .hs-boot files * added (derived) functor instances for some datatypes parametric in the instruction type. It's useful for pretty-printing as we just have to map `pprInstr` before pretty-printing the container datatype.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/regalloc/regalloc_unit_tests.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/testsuite/tests/regalloc/regalloc_unit_tests.hs b/testsuite/tests/regalloc/regalloc_unit_tests.hs
index b4495f5d34..05ce9147d9 100644
--- a/testsuite/tests/regalloc/regalloc_unit_tests.hs
+++ b/testsuite/tests/regalloc/regalloc_unit_tests.hs
@@ -23,6 +23,7 @@ module Main where
import qualified GHC.CmmToAsm.Reg.Graph.Stats as Color
import qualified GHC.CmmToAsm.Reg.Linear.Base as Linear
import qualified GHC.CmmToAsm.X86.Instr as X86.Instr
+import qualified GHC.CmmToAsm.X86 as X86
import GHC.Driver.Main
import GHC.StgToCmm.CgUtils
import GHC.CmmToAsm
@@ -175,7 +176,7 @@ runTests dflags us = testGraphNoSpills dflags noSpillsCmmFile us >>= \res ->
testGraphNoSpills :: DynFlags -> FilePath -> UniqSupply -> IO Bool
testGraphNoSpills dflags' path us = do
colorStats <- fst . concatTupledMaybes <$>
- compileCmmForRegAllocStats dflags path x86NcgImpl us
+ compileCmmForRegAllocStats dflags path X86.ncgX86 us
assertIO "testGraphNoSpills: color stats should not be empty"
$ not (null colorStats)