summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/PPC
diff options
context:
space:
mode:
authorMichal Terepeta <michal.terepeta@gmail.com>2017-06-23 11:41:50 -0400
committerBen Gamari <ben@smart-cactus.org>2017-06-23 13:07:30 -0400
commit42eee6eac3d4bf4b2b557cdc13f2d5acae93d4e8 (patch)
tree68a7bfe0f71a983784afb6c3ba1fcfdbaf62a546 /compiler/nativeGen/PPC
parent9077120918b78f5152bf3596fe6df07b91cead79 (diff)
downloadhaskell-42eee6eac3d4bf4b2b557cdc13f2d5acae93d4e8.tar.gz
Hoopl: remove dependency on Hoopl package
This copies the subset of Hoopl's functionality needed by GHC to `cmm/Hoopl` and removes the dependency on the Hoopl package. The main motivation for this change is the confusing/noisy interface between GHC and Hoopl: - Hoopl has `Label` which is GHC's `BlockId` but different than GHC's `CLabel` - Hoopl has `Unique` which is different than GHC's `Unique` - Hoopl has `Unique{Map,Set}` which are different than GHC's `Uniq{FM,Set}` - GHC has its own specialized copy of `Dataflow`, so `cmm/Hoopl` is needed just to filter the exposed functions (filter out some of the Hoopl's and add the GHC ones) With this change, we'll be able to simplify this significantly. It'll also be much easier to do invasive changes (Hoopl is a public package on Hackage with users that depend on the current behavior) This should introduce no changes in functionality - it merely copies the relevant code. Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com> Test Plan: ./validate Reviewers: austin, bgamari, simonmar Reviewed By: bgamari, simonmar Subscribers: simonpj, kavon, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3616
Diffstat (limited to 'compiler/nativeGen/PPC')
-rw-r--r--compiler/nativeGen/PPC/CodeGen.hs3
-rw-r--r--compiler/nativeGen/PPC/Instr.hs3
-rw-r--r--compiler/nativeGen/PPC/Ppr.hs3
3 files changed, 6 insertions, 3 deletions
diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs
index a1a205bb95..1e88a1d025 100644
--- a/compiler/nativeGen/PPC/CodeGen.hs
+++ b/compiler/nativeGen/PPC/CodeGen.hs
@@ -46,7 +46,8 @@ import Cmm
import CmmUtils
import CmmSwitch
import CLabel
-import Hoopl
+import Hoopl.Block
+import Hoopl.Graph
-- The rest:
import OrdList
diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs
index b8b5043d96..eb179c5a99 100644
--- a/compiler/nativeGen/PPC/Instr.hs
+++ b/compiler/nativeGen/PPC/Instr.hs
@@ -33,7 +33,8 @@ import Reg
import CodeGen.Platform
import BlockId
-import Hoopl
+import Hoopl.Collections
+import Hoopl.Label
import DynFlags
import Cmm
import CmmInfo
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
index 7f30c5b7ee..63d01c3913 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -20,7 +20,8 @@ import RegClass
import TargetReg
import Cmm hiding (topInfoTable)
-import Hoopl
+import Hoopl.Collections
+import Hoopl.Label
import CLabel