cmm/CBE: Use foldLocalRegsDefd
ClosedPublic

Authored by bgamari on Sep 20 2017, 11:57 AM.

Details

Summary

Simonpj suggested this as a follow-on to Trac #14226 to avoid code duplication. This
also gives us the ability to CBE cases involving foreign calls for free.

Test Plan

Validate

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bgamari created this revision.Sep 20 2017, 11:57 AM
bgamari updated this revision to Diff 14007.Sep 20 2017, 11:58 AM

Fix long lines

simonpj accepted this revision.Sep 21 2017, 2:52 AM
simonpj added a subscriber: simonpj.

OK. Doesn't shrink the code as much as I'd hoped!

eqLastWith seems to have gotten a new case, for CmmForeignCall. Is that an unrelated fix?

This revision is now accepted and ready to land.Sep 21 2017, 2:52 AM

OK. Doesn't shrink the code as much as I'd hoped!

eqLastWith seems to have gotten a new case, for CmmForeignCall. Is that an unrelated fix?

It is indeed somewhat separate (although enabled by the refactoring you suggested). I can split it into a separate commit.

michalt added inline comments.
compiler/cmm/CmmCommonBlockElim.hs
386

Is this rebased? AFAICS this should be using eqExprWith.

bgamari updated this revision to Diff 14035.Sep 21 2017, 5:02 PM
bgamari marked an inline comment as done.

Rebase again

This revision was automatically updated to reflect the committed changes.