[llvm-commits] [PATCH] Add Pattern ID Information
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu Aug 4 14:39:53 PDT 2011
On Aug 4, 2011, at 2:09 PM, David A. Greene wrote:
> Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:
>
>> On Aug 4, 2011, at 6:35 AM, David A. Greene wrote:
>
>>> Because sometimes multiple patterns map to an instruction. Think of
>>> Pat<> patterns. It's helpful to know which pattern matched to generate
>>> the instruction.
>>
>> 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 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.
What makes isel special?
>> Why does it need to reserve space in a critical data structure so it
>> can be emitted after codegen?
>
> See above.
>
> Note that there is no space penalty for hosts with 64-bit pointers. For
> hosts with 32-bit pointers it will probably vary somewhat.
>
> 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.
I completely agree that the current isel output is bad. Your help in cleaning that up would be appreciated.
/jakob
More information about the llvm-commits
mailing list