[llvm-commits] [PATCH] Add Pattern ID Information
Chris Lattner
clattner at apple.com
Thu Aug 4 11:43:17 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.
I guess I don't see the value in distinguishing which of several possible Pat<> patterns matched a specific instruction. If you need that level of detail, you'll be looking at dag dumps anyway.
-Chris
More information about the llvm-commits
mailing list