cvs commit: fptools/ghc/compiler/basicTypes BasicTypes.lhs IdInfo.lhs MkId.lhs fptools/ghc/compiler/coreSyn PprCore.lhs fptools/ghc/compiler/main CodeOutput.lhs fptools/ghc/compiler/simplCore OccurAnal.lhs SimplCore.lhs fptools/ghc/compiler/specialise ...

Simon Peyton Jones simonpj at haskell.org
Mon Mar 7 11:46:25 EST 2005


simonpj     2005/03/07 08:46:25 PST

  Modified files:
    ghc/compiler/basicTypes BasicTypes.lhs IdInfo.lhs MkId.lhs 
    ghc/compiler/coreSyn PprCore.lhs 
    ghc/compiler/main    CodeOutput.lhs 
    ghc/compiler/simplCore OccurAnal.lhs SimplCore.lhs 
    ghc/compiler/specialise Rules.lhs 
  Log:
  	-----------------------------------------
         Fix a long-standing indirection-zapping bug
  	-----------------------------------------
  
  	Merge to STABLE
  
  Up to now we zap indirections as part of the occurence analyser.
  But this is bogus.  The indirection zapper does the following:
  
  	x_local = <expression>
  	...bindings...
  	x_exported = x_local
  
  where x_exported is exported, and x_local is not, then we
  replace it with this:
  
  	x_exported = <expression>
  	x_local = x_exported
  	...bindings...
  
  But this is plain wrong if x_exported has a RULE that mentions
  something (f, say) in ...bindings.., because 'f' will then die.
  
  After hacking a few solutions, I've eventually simply made the indirection
  zapping into a separate pass (which is cleaner anyway), which wraps the
  entire program back into a single Rec if the bad thing can happen.
  
  On the way I've made indirection-zapping work in Recs too, which wasn't the
  case before.
  
  * Move the zapper from OccurAnal into SimplCore
  * Tidy up the printing of pragmas (PprCore and friends)
  * Add a new function Rules.addRules
  * Merge rules in the indirection zapper (previously one set was discarded)
  
  Revision  Changes    Path
  1.36      +5 -5      fptools/ghc/compiler/basicTypes/BasicTypes.lhs
  1.115     +1 -69     fptools/ghc/compiler/basicTypes/IdInfo.lhs
  1.121     +2 -2      fptools/ghc/compiler/basicTypes/MkId.lhs
  1.87      +5 -3      fptools/ghc/compiler/coreSyn/PprCore.lhs
  1.57      +0 -1      fptools/ghc/compiler/main/CodeOutput.lhs
  1.74      +23 -149   fptools/ghc/compiler/simplCore/OccurAnal.lhs
  1.130     +208 -6    fptools/ghc/compiler/simplCore/SimplCore.lhs
  1.48      +6 -3      fptools/ghc/compiler/specialise/Rules.lhs


More information about the Cvs-ghc mailing list