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

David A. Greene greened at obbligato.org
Thu Aug 4 06:35:29 PDT 2011


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.

>> This is really helpful for tracking down isel issues and was invaluable during
>> AVX implementation and tuning.  So I want to get this in before I start doing
>> the heavy-duty AVX merging.
>
> What merging do you anticipate?  Mainline supports almost all of AVX,
> there are just a few bugs left and missed optimizations.

There are a lot of bugs and missed optimizations.  I have a couple
years' worth of bug fixing and tuning plus a complete reorganization of
the SIMD specification so that adding stuff like AVX2 will be trivial.

                              -Dave



More information about the llvm-commits mailing list