summaryrefslogtreecommitdiff
path: root/lib/Analysis/DependenceAnalysis.cpp
diff options
context:
space:
mode:
authorSebastian Pop <spop@codeaurora.org>2012-11-20 22:28:04 +0000
committerSebastian Pop <spop@codeaurora.org>2012-11-20 22:28:04 +0000
commit7372a7d5f87bf1ff65d07f25bae037ddc4df994d (patch)
treea646bca1d17544a0f48786dd6817eef6812fc9d3 /lib/Analysis/DependenceAnalysis.cpp
parent17cfe87c390265187d16a60ff4d7687802a07bba (diff)
downloadllvm-7372a7d5f87bf1ff65d07f25bae037ddc4df994d.tar.gz
llvm-7372a7d5f87bf1ff65d07f25bae037ddc4df994d.tar.bz2
llvm-7372a7d5f87bf1ff65d07f25bae037ddc4df994d.tar.xz
removes a few "const" qualifiers
so that I can (someday) call SE->getSCEV without complaint. No semantic change intended. Patch from Preston Briggs <preston.briggs@gmail.com>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DependenceAnalysis.cpp')
-rw-r--r--lib/Analysis/DependenceAnalysis.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Analysis/DependenceAnalysis.cpp b/lib/Analysis/DependenceAnalysis.cpp
index 29a6f96cb2..6291e99584 100644
--- a/lib/Analysis/DependenceAnalysis.cpp
+++ b/lib/Analysis/DependenceAnalysis.cpp
@@ -221,8 +221,8 @@ bool Dependence::isScalar(unsigned level) const {
//===----------------------------------------------------------------------===//
// FullDependence methods
-FullDependence::FullDependence(const Instruction *Source,
- const Instruction *Destination,
+FullDependence::FullDependence(Instruction *Source,
+ Instruction *Destination,
bool PossiblyLoopIndependent,
unsigned CommonLevels) :
Dependence(Source, Destination),
@@ -649,10 +649,10 @@ bool isLoadOrStore(const Instruction *I) {
static
-const Value *getPointerOperand(const Instruction *I) {
- if (const LoadInst *LI = dyn_cast<LoadInst>(I))
+Value *getPointerOperand(Instruction *I) {
+ if (LoadInst *LI = dyn_cast<LoadInst>(I))
return LI->getPointerOperand();
- if (const StoreInst *SI = dyn_cast<StoreInst>(I))
+ if (StoreInst *SI = dyn_cast<StoreInst>(I))
return SI->getPointerOperand();
llvm_unreachable("Value is not load or store instruction");
return 0;
@@ -3195,8 +3195,8 @@ static void dumpSmallBitVector(SmallBitVector &BV) {
// PLDI 1991
//
// Care is required to keep the code below up to date w.r.t. this routine.
-Dependence *DependenceAnalysis::depends(const Instruction *Src,
- const Instruction *Dst,
+Dependence *DependenceAnalysis::depends(Instruction *Src,
+ Instruction *Dst,
bool PossiblyLoopIndependent) {
if ((!Src->mayReadFromMemory() && !Src->mayWriteToMemory()) ||
(!Dst->mayReadFromMemory() && !Dst->mayWriteToMemory()))
@@ -3207,8 +3207,8 @@ Dependence *DependenceAnalysis::depends(const Instruction *Src,
// can only analyze simple loads and stores, i.e., no calls, invokes, etc.
return new Dependence(Src, Dst);
- const Value *SrcPtr = getPointerOperand(Src);
- const Value *DstPtr = getPointerOperand(Dst);
+ Value *SrcPtr = getPointerOperand(Src);
+ Value *DstPtr = getPointerOperand(Dst);
switch (underlyingObjectsAlias(AA, DstPtr, SrcPtr)) {
case AliasAnalysis::MayAlias:
@@ -3222,8 +3222,8 @@ Dependence *DependenceAnalysis::depends(const Instruction *Src,
break; // The underlying objects alias; test accesses for dependence.
}
- const GEPOperator *SrcGEP = dyn_cast<GEPOperator>(SrcPtr);
- const GEPOperator *DstGEP = dyn_cast<GEPOperator>(DstPtr);
+ GEPOperator *SrcGEP = dyn_cast<GEPOperator>(SrcPtr);
+ GEPOperator *DstGEP = dyn_cast<GEPOperator>(DstPtr);
if (!SrcGEP || !DstGEP)
return new Dependence(Src, Dst); // missing GEP, assume dependence
@@ -3605,8 +3605,8 @@ const SCEV *DependenceAnalysis::getSplitIteration(const Dependence *Dep,
assert(Dep && "expected a pointer to a Dependence");
assert(Dep->isSplitable(SplitLevel) &&
"Dep should be splitable at SplitLevel");
- const Instruction *Src = Dep->getSrc();
- const 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));