summaryrefslogtreecommitdiff
path: root/compiler/GHC/Cmm/Switch.hs
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-06-29 22:36:40 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-22 20:19:59 -0400
commitf7cc431341e5b5b31758eecc8504cae8b2390c10 (patch)
tree7404d90376432d5a311a7fc6355b02085a1a5367 /compiler/GHC/Cmm/Switch.hs
parent735f9d6bac316a0c1c68a8b49bba465f07b01cdd (diff)
downloadhaskell-f7cc431341e5b5b31758eecc8504cae8b2390c10.tar.gz
Replace HscTarget with Backend
They both have the same role and Backend name is more explicit. Metric Decrease: T3064 Update Haddock submodule
Diffstat (limited to 'compiler/GHC/Cmm/Switch.hs')
-rw-r--r--compiler/GHC/Cmm/Switch.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/GHC/Cmm/Switch.hs b/compiler/GHC/Cmm/Switch.hs
index b8d7456b37..ee0d5a07df 100644
--- a/compiler/GHC/Cmm/Switch.hs
+++ b/compiler/GHC/Cmm/Switch.hs
@@ -8,14 +8,14 @@ module GHC.Cmm.Switch (
switchTargetsToList, eqSwitchTargetWith,
SwitchPlan(..),
- targetSupportsSwitch,
+ backendSupportsSwitch,
createSwitchPlan,
) where
import GHC.Prelude
import GHC.Utils.Outputable
-import GHC.Driver.Session
+import GHC.Driver.Backend
import GHC.Cmm.Dataflow.Label (Label)
import Data.Maybe
@@ -316,12 +316,12 @@ and slowed down all other cases making it not worthwhile.
-}
--- | Does the target support switch out of the box? Then leave this to the
--- target!
-targetSupportsSwitch :: HscTarget -> Bool
-targetSupportsSwitch HscC = True
-targetSupportsSwitch HscLlvm = True
-targetSupportsSwitch _ = False
+-- | Does the backend support switch out of the box? Then leave this to the
+-- backend!
+backendSupportsSwitch :: Backend -> Bool
+backendSupportsSwitch ViaC = True
+backendSupportsSwitch LLVM = True
+backendSupportsSwitch _ = False
-- | This function creates a SwitchPlan from a SwitchTargets value, breaking it
-- down into smaller pieces suitable for code generation.