Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/769f5c90a96742beec5e1870e68b3c7f21d9e573 >--------------------------------------------------------------- commit 769f5c90a96742beec5e1870e68b3c7f21d9e573 Author: Simon Peyton Jones <[email protected]> Date: Sat Jun 11 14:21:39 2011 +0100 Comments only >--------------------------------------------------------------- compiler/coreSyn/CoreUtils.lhs | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/compiler/coreSyn/CoreUtils.lhs b/compiler/coreSyn/CoreUtils.lhs index 4146b62..19ac62f 100644 --- a/compiler/coreSyn/CoreUtils.lhs +++ b/compiler/coreSyn/CoreUtils.lhs @@ -592,6 +592,12 @@ exprIsCheap' good_app other_expr -- Applications and variables go_pap args = all (exprIsCheap' good_app) args -- Used to be "all exprIsTrivial args" due to concerns about -- duplicating nested constructor applications, but see #4978. + -- The principle here is that + -- let x = a +# b in c *# x + -- should behave equivalently to + -- c *# (a +# b) + -- Since lets with cheap RHSs are accepted, + -- so should paps with cheap arguments -------------- go_primop op args = primOpIsCheap op && all (exprIsCheap' good_app) args _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
