diff options
author | Dylan Noblesmith <nobled@dreamwidth.org> | 2014-08-25 00:28:35 +0000 |
---|---|---|
committer | Dylan Noblesmith <nobled@dreamwidth.org> | 2014-08-25 00:28:35 +0000 |
commit | d96ce66cb183fab3884eac3929f9c6b2cc66664c (patch) | |
tree | 5150cc8c50894fd093a31f0c4ac42ecd66b88a03 /llvm/lib/Analysis/DependenceAnalysis.cpp | |
parent | 688fa5e15bf4cd9d47621501ad8e79aa93ab1595 (diff) | |
download | llvm-d96ce66cb183fab3884eac3929f9c6b2cc66664c.zip llvm-d96ce66cb183fab3884eac3929f9c6b2cc66664c.tar.gz llvm-d96ce66cb183fab3884eac3929f9c6b2cc66664c.tar.bz2 |
Analysis: take a reference instead of pointer
This parameter is never null.
llvm-svn: 216356
Diffstat (limited to 'llvm/lib/Analysis/DependenceAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/DependenceAnalysis.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp index d0784f1..312081c 100644 --- a/llvm/lib/Analysis/DependenceAnalysis.cpp +++ b/llvm/lib/Analysis/DependenceAnalysis.cpp @@ -168,7 +168,7 @@ void dumpExampleDependence(raw_ostream &OS, Function *F, for (unsigned Level = 1; Level <= D->getLevels(); Level++) { if (D->isSplitable(Level)) { OS << "da analyze - split level = " << Level; - OS << ", iteration = " << *DA->getSplitIteration(D, Level); + OS << ", iteration = " << *DA->getSplitIteration(*D, Level); OS << "!\n"; } } @@ -3729,13 +3729,12 @@ Dependence *DependenceAnalysis::depends(Instruction *Src, // // breaks the dependence and allows us to vectorize/parallelize // both loops. -const SCEV *DependenceAnalysis::getSplitIteration(const Dependence *Dep, +const SCEV *DependenceAnalysis::getSplitIteration(const Dependence &Dep, unsigned SplitLevel) { - assert(Dep && "expected a pointer to a Dependence"); - assert(Dep->isSplitable(SplitLevel) && + assert(Dep.isSplitable(SplitLevel) && "Dep should be splitable at SplitLevel"); - Instruction *Src = Dep->getSrc(); - Instruction *Dst = Dep->getDst(); + Instruction *Src = Dep.getSrc(); + Instruction *Dst = Dep.getDst(); assert(Src->mayReadFromMemory() || Src->mayWriteToMemory()); assert(Dst->mayReadFromMemory() || Dst->mayWriteToMemory()); assert(isLoadOrStore(Src)); |