[llvm-commits] [PATCH] Add Pattern ID Information
David A. Greene
greened at obbligato.org
Thu Aug 4 17:33:36 PDT 2011
Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:
>>> That sounds like something you could dump on dbgs() during isel.
>>
>> Because there's so much debug output from isel already. Debug output in
>> isel does not adequately show the context surrounding a particular
>> instruction sequence. If I'm looking at asm output trying to figure out
>> why a particular sequence of instructions was picked, it's very hard to
>> try to find the appropriate spot in isel debug output where that
>> information gets dumped.
>
> Cleaning up isel debug output would be great. It is way too noisy.
It's an admirable goal but way beyond the scope of this patch.
>> It's really very difficult to map a piece of an asm file back to the
>> isel debug output related to it.
>
> That also applies to DAG combine, scheduling, and even InstCombine.
Yes it does. In other compiler projects I have emitted similar asm
comments to track various transformations. But that's not on the table
here.
> What makes isel special?
Because when adding support for a new ISA (or extension) isel tends to
be the place where bugs get introduced. :)
>> If space is a concern, I'll put an NDEBUG guard around it. That's not
>> ideal but it should adequately address that particular objection.
>
> It is more of a design concern.
>
> Debugging isel should be supported by isel, not MachineInstr and
> AsmPrinter at the far end of the code generator.
Hmm. We already use asm comments for lots of debug information. A
performance engineer looks at the final product. When I get feedback
from benchmarkers I have to take that asm and map it backward to figure
out what happened. These comments really help that process.
Remember, this only ever happens in a debug build.
Cleaning up isel debug output is also a great project. The two are
complementary, I believe, each useful for various debugging scenarios.
> I completely agree that the current isel output is bad. Your help in
> cleaning that up would be appreciated.
Unfortunately, I don't have the bandwidth to tackle that.
-Dave
More information about the llvm-commits
mailing list