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

Simon Peyton Jones simonpj@glass.cse.ogi.edu
Mon, 1 Oct 2001 02:45:39 -0700


simonpj     2001/10/01 02:45:38 PDT

  Modified files:
    ghc/compiler/simplCore SimplUtils.lhs Simplify.lhs 
  Log:
  	---------------------------
  	Match rules before inlining
  	---------------------------
  
  This commit fulfils a long-standing wish by Manuel that RULES
  matching occurs before inlining.  So if a RULE matches, it'll
  get used, even if the function can also be inlined.
  
  It's a bit dodgy to actually rely on this, because maybe the rule
  doesn't match *yet* but will do after a bit more transformation.
  But it does help with things like class operations.  Class ops are
  simply selectors which pick a method out of a dictionary, so they
  are inlined rather vigorously.  But we might want a RULE for a
  class method (e.g. (==) [Char] = eqString), and such rules would
  practically never fire if inlining took priority.
  
  Revision  Changes    Path
  1.70      +21 -33    fptools/ghc/compiler/simplCore/SimplUtils.lhs
  1.114     +86 -57    fptools/ghc/compiler/simplCore/Simplify.lhs