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

Richard Sandiford rsandifo at linux.vnet.ibm.com
Wed Oct 16 03:05:19 PDT 2013


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1894.1.patch
Type: text/x-patch
Size: 64416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131016/b61b1f34/attachment.bin>


More information about the llvm-commits mailing list