summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/RegAlloc
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-08-21 10:38:06 +0200
committerBen Gamari <ben@smart-cactus.org>2015-08-21 12:10:07 +0200
commit3452473b4bb180ba327520067b8c6f2a8d6c4f4b (patch)
tree9ff61fd6658051170001ea806ad2c60086083a27 /compiler/nativeGen/RegAlloc
parent9e8562ae02701270e2c1dfcee3279d862dc5b7b6 (diff)
downloadhaskell-3452473b4bb180ba327520067b8c6f2a8d6c4f4b.tar.gz
Delete FastBool
This reverses some of the work done in Trac #1405, and assumes GHC is smart enough to do its own unboxing of booleans now. I would like to do some more performance measurements, but the code changes can be reviewed already. Test Plan: With a perf build: ./inplace/bin/ghc-stage2 nofib/spectral/simple/Main.hs -fforce-recomp +RTS -t --machine-readable before: ``` [("bytes allocated", "1300744864") ,("num_GCs", "302") ,("average_bytes_used", "8811118") ,("max_bytes_used", "24477464") ,("num_byte_usage_samples", "9") ,("peak_megabytes_allocated", "64") ,("init_cpu_seconds", "0.001") ,("init_wall_seconds", "0.001") ,("mutator_cpu_seconds", "2.833") ,("mutator_wall_seconds", "4.283") ,("GC_cpu_seconds", "0.960") ,("GC_wall_seconds", "0.961") ] ``` after: ``` [("bytes allocated", "1301088064") ,("num_GCs", "310") ,("average_bytes_used", "8820253") ,("max_bytes_used", "24539904") ,("num_byte_usage_samples", "9") ,("peak_megabytes_allocated", "64") ,("init_cpu_seconds", "0.001") ,("init_wall_seconds", "0.001") ,("mutator_cpu_seconds", "2.876") ,("mutator_wall_seconds", "4.474") ,("GC_cpu_seconds", "0.965") ,("GC_wall_seconds", "0.979") ] ``` CPU time seems to be up a bit, but I'm not sure. Unfortunately CPU time measurements are rather noisy. Reviewers: austin, bgamari, rwbarton Subscribers: nomeata Differential Revision: https://phabricator.haskell.org/D1143 GHC Trac Issues: #1405
Diffstat (limited to 'compiler/nativeGen/RegAlloc')
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs5
2 files changed, 3 insertions, 4 deletions
diff --git a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
index c63d52dda2..b42fb4c39e 100644
--- a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs
@@ -255,7 +255,7 @@ worst n classN classC
-- register allocator to attempt to map VRegs to.
allocatableRegs :: [RegNo]
allocatableRegs
- = let isFree i = isFastTrue (freeReg i)
+ = let isFree i = freeReg i
in filter isFree allMachRegNos
diff --git a/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs
index 6b6e67c612..2cb9999ce7 100644
--- a/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/SPARC/FreeRegs.hs
@@ -10,7 +10,6 @@ import Reg
import CodeGen.Platform
import Outputable
import Platform
-import FastBool
import Data.Word
import Data.Bits
@@ -75,7 +74,7 @@ allocateReg platform
(FreeRegs g f d)
-- can't allocate free regs
- | not $ isFastTrue (freeReg platform r)
+ | not $ freeReg platform r
= pprPanic "SPARC.FreeRegs.allocateReg: not allocating pinned reg" (ppr reg)
-- a general purpose reg
@@ -131,7 +130,7 @@ releaseReg platform
regs@(FreeRegs g f d)
-- don't release pinned reg
- | not $ isFastTrue (freeReg platform r)
+ | not $ freeReg platform r
= regs
-- a general purpose reg