[PATCH] Keep TBAA info when rewriting load and store DAG nodes
Hal Finkel
hfinkel at anl.gov
Thu Oct 24 01:41:39 PDT 2013
Richard,
Thanks for working on this! As far as I can tell, this is all fairly mechanical (and it looks like you were careful to only reuse the original MMO when the pointer offset and/or alignment did not change). It is also a nice cleanup.
Dan, Owen, do either of you have any thoughts on this?
-Hal
----- Original Message -----
> 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
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list