[llvm-branch-commits] [llvm-branch] r79137 - in /llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG: LegalizeDAG.cpp SelectionDAG.cpp TargetLowering.cpp

Bill Wendling isanbard at gmail.com
Sat Aug 15 14:21:45 PDT 2009


Author: void
Date: Sat Aug 15 16:21:45 2009
New Revision: 79137

URL: http://llvm.org/viewvc/llvm-project?rev=79137&view=rev
Log:
$ svn merge -c 79133 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r79133 into '.':
U    lib/CodeGen/SelectionDAG/SelectionDAG.cpp
U    lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
U    lib/CodeGen/SelectionDAG/TargetLowering.cpp


Modified:
    llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
    llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Modified: llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=79137&r1=79136&r2=79137&view=diff

==============================================================================
--- llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Sat Aug 15 16:21:45 2009
@@ -1069,7 +1069,7 @@
       case TargetLowering::Legal:
         // If this is an unaligned load and the target doesn't support it,
         // expand it.
-        if (!TLI.allowsUnalignedMemoryAccesses()) {
+        if (!TLI.allowsUnalignedMemoryAccesses(LD->getMemoryVT())) {
           const Type *Ty = LD->getMemoryVT().getTypeForEVT(*DAG.getContext());
           unsigned ABIAlignment = TLI.getTargetData()->getABITypeAlignment(Ty);
           if (LD->getAlignment() < ABIAlignment){
@@ -1252,7 +1252,7 @@
           } else {
             // If this is an unaligned load and the target doesn't support it,
             // expand it.
-            if (!TLI.allowsUnalignedMemoryAccesses()) {
+            if (!TLI.allowsUnalignedMemoryAccesses(LD->getMemoryVT())) {
               const Type *Ty = LD->getMemoryVT().getTypeForEVT(*DAG.getContext());
               unsigned ABIAlignment = TLI.getTargetData()->getABITypeAlignment(Ty);
               if (LD->getAlignment() < ABIAlignment){
@@ -1330,7 +1330,7 @@
         case TargetLowering::Legal:
           // If this is an unaligned store and the target doesn't support it,
           // expand it.
-          if (!TLI.allowsUnalignedMemoryAccesses()) {
+          if (!TLI.allowsUnalignedMemoryAccesses(ST->getMemoryVT())) {
             const Type *Ty = ST->getMemoryVT().getTypeForEVT(*DAG.getContext());
             unsigned ABIAlignment = TLI.getTargetData()->getABITypeAlignment(Ty);
             if (ST->getAlignment() < ABIAlignment)
@@ -1429,7 +1429,7 @@
         case TargetLowering::Legal:
           // If this is an unaligned store and the target doesn't support it,
           // expand it.
-          if (!TLI.allowsUnalignedMemoryAccesses()) {
+          if (!TLI.allowsUnalignedMemoryAccesses(ST->getMemoryVT())) {
             const Type *Ty = ST->getMemoryVT().getTypeForEVT(*DAG.getContext());
             unsigned ABIAlignment = TLI.getTargetData()->getABITypeAlignment(Ty);
             if (ST->getAlignment() < ABIAlignment)

Modified: llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=79137&r1=79136&r2=79137&view=diff

==============================================================================
--- llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Aug 15 16:21:45 2009
@@ -3105,8 +3105,8 @@
                               const TargetLowering &TLI) {
   isSrcStr = isMemSrcFromString(Src, Str);
   bool isSrcConst = isa<ConstantSDNode>(Src);
-  bool AllowUnalign = TLI.allowsUnalignedMemoryAccesses();
   EVT VT = TLI.getOptimalMemOpType(Size, Align, isSrcConst, isSrcStr, DAG);
+  bool AllowUnalign = TLI.allowsUnalignedMemoryAccesses(VT);
   if (VT != MVT::iAny) {
     unsigned NewAlign = (unsigned)
       TLI.getTargetData()->getABITypeAlignment(

Modified: llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=79137&r1=79136&r2=79137&view=diff

==============================================================================
--- llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/branches/Apple/Leela/lib/CodeGen/SelectionDAG/TargetLowering.cpp Sat Aug 15 16:21:45 2009
@@ -501,7 +501,6 @@
   memset(RegClassForVT, 0,MVT::LAST_VALUETYPE*sizeof(TargetRegisterClass*));
   memset(TargetDAGCombineArray, 0, array_lengthof(TargetDAGCombineArray));
   maxStoresPerMemset = maxStoresPerMemcpy = maxStoresPerMemmove = 8;
-  allowUnalignedMemoryAccesses = false;
   benefitFromCodePlacementOpt = false;
   UseUnderscoreSetJmp = false;
   UseUnderscoreLongJmp = false;





More information about the llvm-branch-commits mailing list