• Simon Marlow's avatar
    Improve optimisation in the presence of SCCs (fixes #5363) · eea40328
    Simon Marlow authored
    We had some special cases to handle things like
    
      case (scc c (case E of alts)) of alts'
    
    but it only worked when there was a single scc in the way.  This
    generalises the optimisation to handle multiple sccs and ticks, so
    that we can catch most case-of-case optimisations that would normally
    apply in the absence of profiling.
    
    This fixes the example in #5363, and nofib results (with -prof
    -fprof-auto) show that allocation universally goes down or stays the
    same.
    eea40328
Simplify.lhs 106 KB