[llvm-commits] [PATCH] Add Pattern ID Information
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu Aug 4 13:54:11 PDT 2011
On Aug 4, 2011, at 6:35 AM, David A. Greene wrote:
> Chris Lattner <clattner at apple.com> writes:
>
>> On Aug 3, 2011, at 4:38 PM, David Greene wrote:
>>> I've got a patch series ready to implement support for printing asm comments
>>> about instruction selection. For example:
>>>
>>> incq %rdx # test.c:38
>>> # Src: (add:i64 GR64:i64:$src, 1:i64)
>>> # Dst: (INC64r:i64 GR64:i64:$src)
>>
>> Out of curiosity, how is this any better than just listing the
>> 'INC64r' opcode? We already have that accessible and don't need to
>> add anything to MachineInstr to get it.
>
> 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.
Why does it need to reserve space in a critical data structure so it can be emitted after codegen?
/jakob
More information about the llvm-commits
mailing list