comment lines in Cmm outputs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

comment lines in Cmm outputs

Ömer Sinan Ağacan
I'm reading a lot of Cmm  these days and comments added by Cmm dump (which are
apparently added after 8.0.1) are so annoying becuase they're not saying
anything useful (what's the point of adding "// CmmCall" to a "call" line or
"// CmmCondBranch" to a "if" line?) but making a lot of noise. Why were those
added? Can we remove them?
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: comment lines in Cmm outputs

Ben Gamari-2
Ömer Sinan Ağacan <[hidden email]> writes:

> I'm reading a lot of Cmm  these days and comments added by Cmm dump (which are
> apparently added after 8.0.1) are so annoying becuase they're not saying
> anything useful (what's the point of adding "// CmmCall" to a "call" line or
> "// CmmCondBranch" to a "if" line?) but making a lot of noise. Why were those
> added? Can we remove them?

It looks like they've been with us since the initial merge of the new
codegen. I agree that they don't add much value but I don't have any
strong opinion either way. The only comment that we might want to
retain is the one for CmmUnsafeForeignCall as it looks quite similar to
a CmmCall.

Cheers,

- Ben

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

signature.asc (482 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: comment lines in Cmm outputs

Ömer Sinan Ağacan
Wait, isn't new codegen merged years ago? I don't see these comment
lines in 8.0.1-generated Cmm files. Comments in the AST may be there
but no comments were printed until very recently.

If no one feels strongly about this I'd love to remove those.

2016-05-29 11:14 GMT-04:00 Ben Gamari <[hidden email]>:

> Ömer Sinan Ağacan <[hidden email]> writes:
>
>> I'm reading a lot of Cmm  these days and comments added by Cmm dump (which are
>> apparently added after 8.0.1) are so annoying becuase they're not saying
>> anything useful (what's the point of adding "// CmmCall" to a "call" line or
>> "// CmmCondBranch" to a "if" line?) but making a lot of noise. Why were those
>> added? Can we remove them?
>
> It looks like they've been with us since the initial merge of the new
> codegen. I agree that they don't add much value but I don't have any
> strong opinion either way. The only comment that we might want to
> retain is the one for CmmUnsafeForeignCall as it looks quite similar to
> a CmmCall.
>
> Cheers,
>
> - Ben
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: comment lines in Cmm outputs

Ömer Sinan Ağacan
In reply to this post by Ben Gamari-2
2016-05-29 11:14 GMT-04:00 Ben Gamari <[hidden email]>:
> CmmUnsafeForeignCall as it looks quite similar to
> a CmmCall

Well then maybe we should print those differently instead of adding
noise to every single line just to distinguish CmmUnsafeForeignCall
from CmmCall.
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: comment lines in Cmm outputs

Ben Gamari-2
In reply to this post by Ömer Sinan Ağacan
Ömer Sinan Ağacan <[hidden email]> writes:

> Wait, isn't new codegen merged years ago? I don't see these comment
> lines in 8.0.1-generated Cmm files. Comments in the AST may be there
> but no comments were printed until very recently.
>
Are you sure you are looking at code generated with similar options?
Note that the comments that you are referring to are only generated with
DEBUG defined (see the bottom of PprCmm).

> If no one feels strongly about this I'd love to remove those.
>
Assuming Simon Marlow is okay with it I certainly won't object.

Cheers,

- Ben


_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

signature.asc (482 bytes) Download Attachment