comment lines in Cmm outputs

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?

Ö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?
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

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
Ömer Sinan Ağacan
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

Ö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.
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
participants (2)
-
Ben Gamari
-
Ömer Sinan Ağacan