diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-06-29 22:36:40 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-22 20:19:59 -0400 |
commit | f7cc431341e5b5b31758eecc8504cae8b2390c10 (patch) | |
tree | 7404d90376432d5a311a7fc6355b02085a1a5367 /compiler/GHC/StgToCmm/Prim.hs | |
parent | 735f9d6bac316a0c1c68a8b49bba465f07b01cdd (diff) | |
download | haskell-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/StgToCmm/Prim.hs')
-rw-r--r-- | compiler/GHC/StgToCmm/Prim.hs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/GHC/StgToCmm/Prim.hs b/compiler/GHC/StgToCmm/Prim.hs index afbcc34836..c3a14f9b1c 100644 --- a/compiler/GHC/StgToCmm/Prim.hs +++ b/compiler/GHC/StgToCmm/Prim.hs @@ -37,6 +37,7 @@ import GHC.StgToCmm.Heap import GHC.StgToCmm.Prof ( costCentreFrom ) import GHC.Driver.Session +import GHC.Driver.Backend import GHC.Platform import GHC.Types.Basic import GHC.Cmm.BlockId @@ -1594,12 +1595,8 @@ emitPrimOp dflags primop = case primop of [_, CmmLit (CmmInt n _) ] -> isJust (exactLog2 n) _ -> False - ncg = case hscTarget dflags of - HscAsm -> True - _ -> False - llvm = case hscTarget dflags of - HscLlvm -> True - _ -> False + ncg = backend dflags == NCG + llvm = backend dflags == LLVM x86ish = case platformArch platform of ArchX86 -> True ArchX86_64 -> True @@ -2169,7 +2166,7 @@ vecElemProjectCast _ _ _ = Nothing checkVecCompatibility :: DynFlags -> PrimOpVecCat -> Length -> Width -> FCode () checkVecCompatibility dflags vcat l w = do - when (hscTarget dflags /= HscLlvm) $ do + when (backend dflags /= LLVM) $ do sorry $ unlines ["SIMD vector instructions require the LLVM back-end." ,"Please use -fllvm."] check vecWidth vcat l w |