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-boun...@haskell.org> im Auftrag von Norman Ramsey 
<n...@cs.tufts.edu>
Gesendet: Donnerstag, Dezember 9, 2021 8:16 PM
An: Andreas Klebinger
Cc: ghc-devs@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@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to