[llvm-commits] [llvm] r133286 - in /llvm/trunk: include/llvm/MC/MCStreamer.h include/llvm/Target/TargetRegistry.h lib/CodeGen/LLVMTargetMachine.cpp lib/MC/MCAsmStreamer.cpp lib/Target/PTX/PTXMCAsmStreamer.cpp lib/Target/PTX/PTXTargetMachine.cpp tools/llvm-mc/llvm-mc.cpp

Chris Lattner clattner at apple.com
Sat Jun 18 12:33:49 PDT 2011


On Jun 18, 2011, at 1:52 AM, Bill Wendling wrote:
>>>> 
>>>> Also, why is this implemented by subclassing MCAsmStreamer?  Can't the code generator just emit this as verbose asm comments instead of reconstructing it?
>>> 
>>> I actually do some of that now (see below). It's not the most readable thing in the world, but could be made a bit better. One major benefit of making it a subclass of MCAsmStreamer, however, is that you can run it on a .s file which doesn't have verbose comments in them. I would really like to maintain that ability.
>> 
>> Why is this important?  Who is it important for?
>> 
> The motivation for this was for the person who gets a random .s file, or even one that they've built themselves, and needs to understand what the EH table means -- people who get an EH bug report and/or those just starting out looking at exception handling but who haven't deciphered the Eh table documentation yet. More the former group than the latter, but the latter can use it as an instructional aide.

I can see that there is some non-zero value to that, but I think it is pretty close, at least for llvm/clang users.  If they're getting a .s file, it is from 'clang -S' which defaults to verbose asm.

I think this functionality is really useful, but I don't think that the utility of 'llvm-mc' producing it is high enough to justify the complexity.  We should just add it to the asmprinter like everything else (loop depth etc).

-Chris



More information about the llvm-commits mailing list