diff options
author | Gabor Greif <ggreif@gmail.com> | 2019-01-06 00:13:22 +0100 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2019-01-06 00:14:17 +0100 |
commit | 8db91a7da4e749427b005346dec6f0554de6ee33 (patch) | |
tree | fa89a41abc3c8bb8c8f571329a30506a53ae7367 | |
parent | 23c950f6a113a536d0e2080fa65eb8a0ea8eddbc (diff) | |
download | haskell-wip/T16039.tar.gz |
better tracingwip/T16039
-rw-r--r-- | compiler/coreSyn/CoreUtils.hs | 6 | ||||
-rw-r--r-- | compiler/simplCore/FloatOut.hs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/coreSyn/CoreUtils.hs b/compiler/coreSyn/CoreUtils.hs index ea3fe016b1..87e36b9d29 100644 --- a/compiler/coreSyn/CoreUtils.hs +++ b/compiler/coreSyn/CoreUtils.hs @@ -955,14 +955,14 @@ it off at source. exprIsTrivial :: CoreExpr -> Bool -- If you modify this function, you may also --- need to modify getIdFromTrivialExpr +-- need to modify getIdFromTrivialExpr -- TODO exprIsTrivial (Var _) = True -- See Note [Variables are trivial] exprIsTrivial (Type _) = True exprIsTrivial (Coercion _) = True exprIsTrivial (Lit lit) = litIsTrivial lit exprIsTrivial (App e arg) | App (Var f) Type {} <- e - , f `hasKey` noinlineIdKey = pprTrace "exprIsTrivial" (ppr arg) exprIsTrivial arg + , f `hasKey` noinlineIdKey = pprTrace "exprIsTrivial #%#" (ppr f <+> ppr arg) exprIsTrivial arg | not (isRuntimeArg arg) = exprIsTrivial e | otherwise = False exprIsTrivial (Lam b e) = not (isRuntimeVar b) && exprIsTrivial e @@ -1244,7 +1244,7 @@ exprIsCheapX ok_app e | otherwise = go n e go n (App f e) | App (Var v) Type {} <- f , v `hasKey` noinlineIdKey - , isRuntimeArg e = pprTrace "exprIsCheapX" (ppr e) go n e + , isRuntimeArg e = pprTrace "exprIsCheapX $#%#" (ppr v <+> ppr e) go n e go n (App f e) | isRuntimeArg e = go (n+1) f && ok e | otherwise = go n f go n (Let (NonRec _ r) e) = go n e && ok r diff --git a/compiler/simplCore/FloatOut.hs b/compiler/simplCore/FloatOut.hs index 4a1ab68cce..660619f23c 100644 --- a/compiler/simplCore/FloatOut.hs +++ b/compiler/simplCore/FloatOut.hs @@ -397,12 +397,12 @@ floatExpr (Var v) = (zeroStats, emptyFloats, Var v) floatExpr (Type ty) = (zeroStats, emptyFloats, Type ty) floatExpr (Coercion co) = (zeroStats, emptyFloats, Coercion co) floatExpr (Lit lit) = (zeroStats, emptyFloats, Lit lit) - +{- floatExpr (App (App (Var v) _) e) | v `hasKey` noinlineIdKey , pprTrace "floatExpr" (ppr e) False = undefined - +-} floatExpr (App e a) = case (atJoinCeiling $ floatExpr e) of { (fse, floats_e, e') -> case (atJoinCeiling $ floatExpr a) of { (fsa, floats_a, a') -> |