[llvm-commits] [PATCH] Add Pattern ID Information

David A. Greene dag at cray.com
Thu Aug 4 14:09:19 PDT 2011


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.

It's really very difficult to map a piece of an asm file back to the
isel debug output related to it.

> 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.

                                   -Dave



More information about the llvm-commits mailing list