[PING] Keep TBAA info when rewriting load and store DAG nodes

Chris Lattner clattner at apple.com
Sat Oct 26 18:08:03 PDT 2013


LGTM!  Thanks Richard,

-Chris

On Oct 16, 2013, at 3:05 AM, Richard Sandiford <rsandifo at linux.vnet.ibm.com> wrote:

> Second ping.  Please let me know if there's something I can do to make
> this easier to review.
> 
> Richard Sandiford <rsandifo at linux.vnet.ibm.com> writes:
>> Most SelectionDAG code drops the TBAA info when creating a new form of a
>> load and store (e.g. during legalisation, or when converting a plain
>> load to an extending one).  This patch tries to catch all cases where
>> the TBAA information can legitimately be carried over.
>> 
>> There is nice getTruncStore() function that allows the original
>> MachineMemOperand to be passed instead of the individual fields.  The
>> patch adds a similar thing for getLoad() and getExtLoad().
>> 
>> The idea is to use the MachineMemOperand forms when all fields are
>> carried over (size, pointer info, isVolatile, isNonTemporal, alignment
>> and TBAA info).  If some adjustment is being made, e.g. to narrow the
>> load, then we still pass the individual fields but also pass the TBAA
>> info.
>> 
>> This is trying to update all uses in SelectionDAG/, so I don't have a
>> testcase for all of them.  But the patch includes an example where the
>> change helps for SystemZ.  (I'm hoping to make useAA() the default for
>> SystemZ if this goes in, but that's a separate change.  I'll drop the
>> explicit -combiner-* flags when that happens.)
>> 
>> 
>> http://llvm-reviews.chandlerc.com/D1894
>> 
>> Files:
>>  include/llvm/CodeGen/SelectionDAG.h
>>  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
>>  lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
>>  lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
>>  lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
>>  lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
>>  lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
>>  lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
>>  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
>>  test/CodeGen/SystemZ/alias-01.ll
> 
> <D1894.1.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list