[llvm-commits] [llvm] r78277 - /llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp

Andreas Bolka a at bolka.at
Wed Aug 5 20:10:38 PDT 2009


Author: abolka
Date: Wed Aug  5 22:10:33 2009
New Revision: 78277

URL: http://llvm.org/viewvc/llvm-project?rev=78277&view=rev
Log:
Simplify the ZIV tester to the max.

As suggested by Nick Lewycky.

Modified:
    llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp

Modified: llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp?rev=78277&r1=78276&r2=78277&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopDependenceAnalysis.cpp Wed Aug  5 22:10:33 2009
@@ -144,9 +144,8 @@
 LoopDependenceAnalysis::analyseZIV(const SCEV *A,
                                    const SCEV *B,
                                    Subscript *S) const {
-  assert(isZIVPair(A, B));
-  const SCEV *diff = SE->getMinusSCEV(A, B);
-  return diff->isZero() ? Dependent : Independent;
+  assert(isZIVPair(A, B) && "Attempted to ZIV-test non-ZIV SCEVs!");
+  return A == B ? Dependent : Independent;
 }
 
 LoopDependenceAnalysis::DependenceResult





More information about the llvm-commits mailing list