diff options
| author | Iavor S. Diatchki <iavor.diatchki@gmail.com> | 2011-12-29 16:45:30 -0800 |
|---|---|---|
| committer | Iavor S. Diatchki <iavor.diatchki@gmail.com> | 2011-12-29 16:45:30 -0800 |
| commit | 896d20fabdf0087e8dd33cc419a377b7a9adee88 (patch) | |
| tree | 6acfc745bb5d75ccc921af6521e5294d2d69da3f /compiler/nativeGen/AsmCodeGen.lhs | |
| parent | 42186dd64c22f23bbdb15a27e608cb52ba7d617f (diff) | |
| parent | b0c0205e3c0dfefc3ffbd49d22160ad5d624ee1f (diff) | |
| download | haskell-896d20fabdf0087e8dd33cc419a377b7a9adee88.tar.gz | |
Merge branch 'master' into type-nats
Conflicts:
compiler/typecheck/TcCanonical.lhs
compiler/typecheck/TcSMonad.lhs
Diffstat (limited to 'compiler/nativeGen/AsmCodeGen.lhs')
| -rw-r--r-- | compiler/nativeGen/AsmCodeGen.lhs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index bdb411e5f4..f56238fd12 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -843,8 +843,8 @@ instance Monad CmmOptM where addImportCmmOpt :: CLabel -> CmmOptM () addImportCmmOpt lbl = CmmOptM $ \(imports, _dflags) -> (# (), lbl:imports #) -getDynFlagsCmmOpt :: CmmOptM DynFlags -getDynFlagsCmmOpt = CmmOptM $ \(imports, dflags) -> (# dflags, imports #) +instance HasDynFlags CmmOptM where + getDynFlags = CmmOptM $ \(imports, dflags) -> (# dflags, imports #) runCmmOpt :: DynFlags -> CmmOptM a -> (a, [CLabel]) runCmmOpt dflags (CmmOptM f) = case f ([], dflags) of @@ -895,7 +895,7 @@ cmmStmtConFold stmt CmmCondBranch test dest -> do test' <- cmmExprConFold DataReference test - dflags <- getDynFlagsCmmOpt + dflags <- getDynFlags let platform = targetPlatform dflags return $ case test' of CmmLit (CmmInt 0 _) -> @@ -914,7 +914,7 @@ cmmStmtConFold stmt cmmExprConFold :: ReferenceKind -> CmmExpr -> CmmOptM CmmExpr cmmExprConFold referenceKind expr = do - dflags <- getDynFlagsCmmOpt + dflags <- getDynFlags -- Skip constant folding if new code generator is running -- (this optimization is done in Hoopl) let expr' = if dopt Opt_TryNewCodeGen dflags @@ -932,7 +932,7 @@ cmmExprCon _ other = other -- of things to do. cmmExprNative :: ReferenceKind -> CmmExpr -> CmmOptM CmmExpr cmmExprNative referenceKind expr = do - dflags <- getDynFlagsCmmOpt + dflags <- getDynFlags let platform = targetPlatform dflags arch = platformArch platform case expr of |
