cvs commit: fptools/ghc/compiler/simplCore SimplUtils.lhs Simplify.lhs

Simon Peyton Jones simonpj@glass.cse.ogi.edu
Mon, 10 Sep 2001 00:24:10 -0700


simonpj     2001/09/10 00:24:10 PDT

  Modified files:
    ghc/compiler/simplCore SimplUtils.lhs Simplify.lhs 
  Log:
  	-----------------------------------
  	Fix a strictness bug in the simplifier
  	-----------------------------------
  
  This one has been there a long time, but hasn't bitten till
  now.  We should never float a let that is marked "sure to be
  evaluated" out of a let.  It shouldn't happen, and there was
  a warning to check, but the warning cried 'wolf' too often, so
  we have generally ignored it. But the wolf called for supper,
  when compiling spectral/expert with profiling on.
  
  The fix is simple too:
  	* use exprIsValue not exprIsCheap as the test
  	* move the warning, so it doesn't cry wolf
  
  Documentation with Simplify.simplRhs.
  
  On the way, I'm going to conmmit a change in the same module,
  which keeps unfolding info on lambda-bound variables.  This
  improves the elimination of cases when the wrapper does the
  'seq' -- then the worker gets to know that the arg is evaluated.
  
  Revision  Changes    Path
  1.68      +12 -3     fptools/ghc/compiler/simplCore/SimplUtils.lhs
  1.110     +22 -12    fptools/ghc/compiler/simplCore/Simplify.lhs