[llvm-commits] [llvm] r132631 - in /llvm/trunk: lib/Analysis/MemoryDependenceAnalysis.cpp test/Transforms/GVN/rle.ll

Dan Gohman gohman at apple.com
Fri Jun 3 23:48:50 PDT 2011


Author: djg
Date: Sat Jun  4 01:48:50 2011
New Revision: 132631

URL: http://llvm.org/viewvc/llvm-project?rev=132631&view=rev
Log:
Disable the main feature of 130180, the elimination of loads that are
redundant with partially-aliasing loads.

When computing what portion of a clobbering load value is needed,
it doesn't consider phi-translation which may have occurred
between the clobbing load and the redundant load.

Modified:
    llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
    llvm/trunk/test/Transforms/GVN/rle.ll

Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=132631&r1=132630&r2=132631&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Sat Jun  4 01:48:50 2011
@@ -374,10 +374,16 @@
         if (R == AliasAnalysis::MustAlias)
           return MemDepResult::getDef(Inst);
 
+#if 0 // FIXME: Temporarily disabled. GVN is cleverly rewriting loads
+      // in terms of clobbering loads, but since it does this by looking
+      // at the clobbering load directly, it doesn't know about any
+      // phi translation that may have happened along the way.
+
         // If we have a partial alias, then return this as a clobber for the
         // client to handle.
         if (R == AliasAnalysis::PartialAlias)
           return MemDepResult::getClobber(Inst);
+#endif
         
         // Random may-alias loads don't depend on each other without a
         // dependence.

Modified: llvm/trunk/test/Transforms/GVN/rle.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/rle.ll?rev=132631&r1=132630&r2=132631&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GVN/rle.ll (original)
+++ llvm/trunk/test/Transforms/GVN/rle.ll Sat Jun  4 01:48:50 2011
@@ -562,14 +562,14 @@
   %add = add nsw i32 %tmp2, %conv
   ret i32 %add
 
-; CHECK: @load_load_partial_alias
-; CHECK: load i32*
-; CHECK-NOT: load
-; CHECK: lshr i32 {{.*}}, 8
-; CHECK-NOT: load
-; CHECK: trunc i32 {{.*}} to i8
-; CHECK-NOT: load
-; CHECK: ret i32
+; TEMPORARILYDISABLED: @load_load_partial_alias
+; TEMPORARILYDISABLED: load i32*
+; TEMPORARILYDISABLED-NOT: load
+; TEMPORARILYDISABLED: lshr i32 {{.*}}, 8
+; TEMPORARILYDISABLED-NOT: load
+; TEMPORARILYDISABLED: trunc i32 {{.*}} to i8
+; TEMPORARILYDISABLED-NOT: load
+; TEMPORARILYDISABLED: ret i32
 }
 
 
@@ -589,10 +589,10 @@
 
 if.end:
   ret i32 52
-; CHECK: @load_load_partial_alias_cross_block
-; CHECK: land.lhs.true:
-; CHECK-NOT: load i8
-; CHECK: ret i32 %conv6
+; TEMPORARILY_DISABLED: @load_load_partial_alias_cross_block
+; TEMPORARILY_DISABLED: land.lhs.true:
+; TEMPORARILY_DISABLED-NOT: load i8
+; TEMPORARILY_DISABLED: ret i32 %conv6
 }
 
 





More information about the llvm-commits mailing list