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
This commit is contained in:
Sebastian Pop
2012-11-20 22:28:04 +00:00
parent 17cfe87c39
commit 7372a7d5f8
2 changed files with 22 additions and 22 deletions

View File

@@ -53,8 +53,8 @@ namespace llvm {
/// input dependences are unordered. /// input dependences are unordered.
class Dependence { class Dependence {
public: public:
Dependence(const Instruction *Source, Dependence(Instruction *Source,
const Instruction *Destination) : Instruction *Destination) :
Src(Source), Dst(Destination) {} Src(Source), Dst(Destination) {}
virtual ~Dependence() {} virtual ~Dependence() {}
@@ -82,11 +82,11 @@ namespace llvm {
/// getSrc - Returns the source instruction for this dependence. /// getSrc - Returns the source instruction for this dependence.
/// ///
const Instruction *getSrc() const { return Src; } Instruction *getSrc() const { return Src; }
/// getDst - Returns the destination instruction for this dependence. /// getDst - Returns the destination instruction for this dependence.
/// ///
const Instruction *getDst() const { return Dst; } Instruction *getDst() const { return Dst; }
/// isInput - Returns true if this is an input dependence. /// isInput - Returns true if this is an input dependence.
/// ///
@@ -158,7 +158,7 @@ namespace llvm {
/// ///
void dump(raw_ostream &OS) const; void dump(raw_ostream &OS) const;
private: private:
const Instruction *Src, *Dst; Instruction *Src, *Dst;
friend class DependenceAnalysis; friend class DependenceAnalysis;
}; };
@@ -173,8 +173,8 @@ namespace llvm {
/// input dependences are unordered. /// input dependences are unordered.
class FullDependence : public Dependence { class FullDependence : public Dependence {
public: public:
FullDependence(const Instruction *Src, FullDependence(Instruction *Src,
const Instruction *Dst, Instruction *Dst,
bool LoopIndependent, bool LoopIndependent,
unsigned Levels); unsigned Levels);
~FullDependence() { ~FullDependence() {
@@ -243,8 +243,8 @@ namespace llvm {
/// The flag PossiblyLoopIndependent should be set by the caller /// The flag PossiblyLoopIndependent should be set by the caller
/// if it appears that control flow can reach from Src to Dst /// if it appears that control flow can reach from Src to Dst
/// without traversing a loop back edge. /// without traversing a loop back edge.
Dependence *depends(const Instruction *Src, Dependence *depends(Instruction *Src,
const Instruction *Dst, Instruction *Dst,
bool PossiblyLoopIndependent); bool PossiblyLoopIndependent);
/// getSplitIteration - Give a dependence that's splitable at some /// getSplitIteration - Give a dependence that's splitable at some

View File

@@ -221,8 +221,8 @@ bool Dependence::isScalar(unsigned level) const {
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// FullDependence methods // FullDependence methods
FullDependence::FullDependence(const Instruction *Source, FullDependence::FullDependence(Instruction *Source,
const Instruction *Destination, Instruction *Destination,
bool PossiblyLoopIndependent, bool PossiblyLoopIndependent,
unsigned CommonLevels) : unsigned CommonLevels) :
Dependence(Source, Destination), Dependence(Source, Destination),
@@ -649,10 +649,10 @@ bool isLoadOrStore(const Instruction *I) {
static static
const Value *getPointerOperand(const Instruction *I) { Value *getPointerOperand(Instruction *I) {
if (const LoadInst *LI = dyn_cast<LoadInst>(I)) if (LoadInst *LI = dyn_cast<LoadInst>(I))
return LI->getPointerOperand(); return LI->getPointerOperand();
if (const StoreInst *SI = dyn_cast<StoreInst>(I)) if (StoreInst *SI = dyn_cast<StoreInst>(I))
return SI->getPointerOperand(); return SI->getPointerOperand();
llvm_unreachable("Value is not load or store instruction"); llvm_unreachable("Value is not load or store instruction");
return 0; return 0;
@@ -3195,8 +3195,8 @@ static void dumpSmallBitVector(SmallBitVector &BV) {
// PLDI 1991 // PLDI 1991
// //
// Care is required to keep the code below up to date w.r.t. this routine. // Care is required to keep the code below up to date w.r.t. this routine.
Dependence *DependenceAnalysis::depends(const Instruction *Src, Dependence *DependenceAnalysis::depends(Instruction *Src,
const Instruction *Dst, Instruction *Dst,
bool PossiblyLoopIndependent) { bool PossiblyLoopIndependent) {
if ((!Src->mayReadFromMemory() && !Src->mayWriteToMemory()) || if ((!Src->mayReadFromMemory() && !Src->mayWriteToMemory()) ||
(!Dst->mayReadFromMemory() && !Dst->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. // can only analyze simple loads and stores, i.e., no calls, invokes, etc.
return new Dependence(Src, Dst); return new Dependence(Src, Dst);
const Value *SrcPtr = getPointerOperand(Src); Value *SrcPtr = getPointerOperand(Src);
const Value *DstPtr = getPointerOperand(Dst); Value *DstPtr = getPointerOperand(Dst);
switch (underlyingObjectsAlias(AA, DstPtr, SrcPtr)) { switch (underlyingObjectsAlias(AA, DstPtr, SrcPtr)) {
case AliasAnalysis::MayAlias: case AliasAnalysis::MayAlias:
@@ -3222,8 +3222,8 @@ Dependence *DependenceAnalysis::depends(const Instruction *Src,
break; // The underlying objects alias; test accesses for dependence. break; // The underlying objects alias; test accesses for dependence.
} }
const GEPOperator *SrcGEP = dyn_cast<GEPOperator>(SrcPtr); GEPOperator *SrcGEP = dyn_cast<GEPOperator>(SrcPtr);
const GEPOperator *DstGEP = dyn_cast<GEPOperator>(DstPtr); GEPOperator *DstGEP = dyn_cast<GEPOperator>(DstPtr);
if (!SrcGEP || !DstGEP) if (!SrcGEP || !DstGEP)
return new Dependence(Src, Dst); // missing GEP, assume dependence 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 && "expected a pointer to a Dependence");
assert(Dep->isSplitable(SplitLevel) && assert(Dep->isSplitable(SplitLevel) &&
"Dep should be splitable at SplitLevel"); "Dep should be splitable at SplitLevel");
const Instruction *Src = Dep->getSrc(); Instruction *Src = Dep->getSrc();
const Instruction *Dst = Dep->getDst(); Instruction *Dst = Dep->getDst();
assert(Src->mayReadFromMemory() || Src->mayWriteToMemory()); assert(Src->mayReadFromMemory() || Src->mayWriteToMemory());
assert(Dst->mayReadFromMemory() || Dst->mayWriteToMemory()); assert(Dst->mayReadFromMemory() || Dst->mayWriteToMemory());
assert(isLoadOrStore(Src)); assert(isLoadOrStore(Src));