Simon Peyton Jones pushed to branch wip/T23109a at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/Core/Opt/Simplify/Iteration.hs
    ... ... @@ -2349,12 +2349,15 @@ simplOutId env fun cont
    2349 2349
     
    
    2350 2350
            -- If we are not in the first iteration, we have already tried rules and inlining
    
    2351 2351
            -- at the end of the previous iteration; no need to repeat that
    
    2352
    -       ; if not (sm_first_iter (seMode env))
    
    2353
    -         then rebuildCall env arg_info cont
    
    2354
    -         else
    
    2352
    +--       ; if not (sm_first_iter (seMode env))
    
    2353
    +--         then rebuildCall env arg_info cont
    
    2354
    +--         else
    
    2355
    +-- Do this BEFORE so that we can take advantage of single-occ inlines
    
    2356
    +-- Example: T21839c which takes an extra Simplifier iteration after w/w
    
    2357
    +-- if you don't do this
    
    2355 2358
     
    
    2356 2359
         -- Try rewrite rules: Plan (BEFORE) in Note [When to apply rewrite rules]
    
    2357
    -    do { mb_match <- if not (null rules_for_me) &&
    
    2360
    +       ; mb_match <- if not (null rules_for_me) &&
    
    2358 2361
                             (isClassOpId fun || activeUnfolding (seMode env) fun)
    
    2359 2362
                          then tryRules env rules_for_me fun out_args
    
    2360 2363
                          else return Nothing
    
    ... ... @@ -2372,7 +2375,7 @@ simplOutId env fun cont
    2372 2375
     
    
    2373 2376
         -- Neither worked, so just rebuild
    
    2374 2377
         rebuildCall env arg_info cont
    
    2375
    -    } } } } }
    
    2378
    +    } } } }
    
    2376 2379
     
    
    2377 2380
     ---------------------------------------------------------
    
    2378 2381
     --      Dealing with a call site