Alternatives for representing a reverse postorder numbering

Sebastian Graf sgraf1337 at gmail.com
Thu Dec 9 20:41:07 UTC 2021


FWIW, performance of IntMap could be even better if we had mutable fields and a transient (one with freeze/thaw conversion) interface.

We'd need a GHC with https://github.com/ghc-proposals/ghc-proposals/pull/8/files for that, though...

I think we could also speed up substitution by using a transient substitution type.
________________________________
Von: ghc-devs <ghc-devs-bounces at haskell.org> im Auftrag von Norman Ramsey <nr at cs.tufts.edu>
Gesendet: Donnerstag, Dezember 9, 2021 8:16 PM
An: Andreas Klebinger
Cc: ghc-devs at haskell.org
Betreff: Re: Alternatives for representing a reverse postorder numbering

> Which I guess mostly depends on how much mileage we get out of the
 > numbering... I rarely have lost sleep over the overhead of looking
 > things up in IntMaps.

Thank you!!  I found your analysis very helpful.  I will stick with
the IntMaps until and unless things reach a stage where they look
really ugly.

 > There is no invariant that Cmm control flow is reducible. So we
 > can't always rely on this being the case.

Good to know.  I would still like to have a simple Haskell example
that generates an irreducible control-flow graph, but for now I can
just write them by hand using .cmm files.

BTW *every* control-flow graph has at least one reverse-postorder
numbering, whether it is reducible or not.


Norman

_______________________________________________
ghc-devs mailing list
ghc-devs at haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20211209/c487331b/attachment.html>


More information about the ghc-devs mailing list