summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-10-26 15:05:27 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-11 03:19:59 -0500
commit6e23695e7d84aa248e7ca20bdb8d133f9b356548 (patch)
treec967ccca8144d32c56f323bb4e4ea7e524d3ad02 /testsuite
parentfcfda909fd7fcf539ff31717ce01a56292abb92f (diff)
downloadhaskell-6e23695e7d84aa248e7ca20bdb8d133f9b356548.tar.gz
Move this_module into NCGConfig
In various places in the NCG we need the Module currently being compiled. Let's move this into the environment instead of chewing threw another register.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/regalloc/regalloc_unit_tests.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/tests/regalloc/regalloc_unit_tests.hs b/testsuite/tests/regalloc/regalloc_unit_tests.hs
index c6902d48be..6bd6864706 100644
--- a/testsuite/tests/regalloc/regalloc_unit_tests.hs
+++ b/testsuite/tests/regalloc/regalloc_unit_tests.hs
@@ -106,7 +106,7 @@ compileCmmForRegAllocStats ::
IO [( Maybe [Color.RegAllocStats (Alignment, RawCmmStatics) X86.Instr.Instr]
, Maybe [Linear.RegAllocStats])]
compileCmmForRegAllocStats dflags' cmmFile ncgImplF us = do
- let ncgImpl = ncgImplF (initNCGConfig dflags)
+ let ncgImpl = ncgImplF (initNCGConfig dflags thisMod)
hscEnv <- newHscEnv dflags
-- parse the cmm file and output any warnings or errors
@@ -126,7 +126,7 @@ compileCmmForRegAllocStats dflags' cmmFile ncgImplF us = do
-- compile and discard the generated code, returning regalloc stats
mapM (\ (count, thisCmm) ->
- cmmNativeGen dflags thisMod thisModLoc ncgImpl
+ cmmNativeGen dflags thisModLoc ncgImpl
usb dwarfFileIds dbgMap thisCmm count >>=
(\(_, _, _, _, colorStats, linearStats, _) ->
-- scrub unneeded output from cmmNativeGen