summaryrefslogtreecommitdiff
path: root/compiler/GHC/Cmm
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-04-08 13:01:24 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-04-13 15:38:41 -0400
commit9579a855ecd50ddfb54dec3d0e1f25e57d54d968 (patch)
tree98cef20080cd737e7c362227190be4b0d53b491b /compiler/GHC/Cmm
parenta42dbc55ad1aff242c0b6b2b22188a25d588c8bf (diff)
downloadhaskell-wip/move-backendSupportsSwitch.tar.gz
Move `backendSupportsSwitch` to `GHC.Driver.Config.Cmm`wip/move-backendSupportsSwitch
`Backend` is a CLI syntax notion `DynFlags` that shouldn't be used in specific components, only in the translation from `DynFlags`. ------------------------- Metric Decrease: T9630 -------------------------
Diffstat (limited to 'compiler/GHC/Cmm')
-rw-r--r--compiler/GHC/Cmm/Switch.hs9
1 files changed, 0 insertions, 9 deletions
diff --git a/compiler/GHC/Cmm/Switch.hs b/compiler/GHC/Cmm/Switch.hs
index f8c6c674ef..42b01b36e3 100644
--- a/compiler/GHC/Cmm/Switch.hs
+++ b/compiler/GHC/Cmm/Switch.hs
@@ -8,14 +8,12 @@ module GHC.Cmm.Switch (
switchTargetsToList, eqSwitchTargetWith,
SwitchPlan(..),
- backendSupportsSwitch,
createSwitchPlan,
) where
import GHC.Prelude
import GHC.Utils.Outputable
-import GHC.Driver.Backend
import GHC.Utils.Panic
import GHC.Cmm.Dataflow.Label (Label)
@@ -312,13 +310,6 @@ and slowed down all other cases making it not worthwhile.
-}
--- | 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.
createSwitchPlan :: SwitchTargets -> SwitchPlan