diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2011-07-18 09:53:32 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2011-07-18 09:53:32 +0000 |
commit | 55927aa400d34e8f3d91f016861a56fcd2912af2 (patch) | |
tree | 24245f873dee9d1aff158f03bb116c5c2277ce07 | |
parent | 91c62bfc0355e982c54ca50ca45890d1599e6156 (diff) | |
download | bcm5719-llvm-55927aa400d34e8f3d91f016861a56fcd2912af2.tar.gz bcm5719-llvm-55927aa400d34e8f3d91f016861a56fcd2912af2.zip |
Use llvm::*Type without const
llvm-svn: 135384
-rwxr-xr-x | polly/include/polly/Support/AffineSCEVIterator.h | 6 | ||||
-rw-r--r-- | polly/lib/CodeGeneration.cpp | 32 |
2 files changed, 19 insertions, 19 deletions
diff --git a/polly/include/polly/Support/AffineSCEVIterator.h b/polly/include/polly/Support/AffineSCEVIterator.h index c845a492fa0..d714a8a89a2 100755 --- a/polly/include/polly/Support/AffineSCEVIterator.h +++ b/polly/include/polly/Support/AffineSCEVIterator.h @@ -28,7 +28,7 @@ using namespace llvm; namespace polly { /// @brief The itertor transform the scalar expressions to the form of sum of -/// (constant * varialbe)s, and return the variable/constant pairs one by one +/// (constant * variable)s, and return the variable/constant pairs one by one /// on the fly. /// /// For example, we can write SCEV: @@ -85,7 +85,7 @@ private: } value_type visitUnknown(const SCEVUnknown* S) { - const Type *AllocTy; + Type *AllocTy; Constant *FieldNo; // We treat these as constant. if (S->isSizeOf (AllocTy) || @@ -235,7 +235,7 @@ public: if (isa<SCEVCouldNotCompute>(S)) return; - const Type *Ty = S->getType(); + Type *Ty = S->getType(); // Init the constant component. visitStack.push_back(SE->getConstant(Ty, 0)); diff --git a/polly/lib/CodeGeneration.cpp b/polly/lib/CodeGeneration.cpp index efe0182a198..945038c6186 100644 --- a/polly/lib/CodeGeneration.cpp +++ b/polly/lib/CodeGeneration.cpp @@ -111,7 +111,7 @@ static void createLoop(IRBuilder<> *Builder, Value *LB, Value *UB, APInt Stride, assert(LB->getType() == UB->getType() && "Different types for upper and lower bound."); - const IntegerType *LoopIVType = dyn_cast<IntegerType>(UB->getType()); + IntegerType *LoopIVType = dyn_cast<IntegerType>(UB->getType()); assert(LoopIVType && "UB is not integer?"); // IV @@ -211,11 +211,11 @@ public: return const_cast<Value*>(OldOperand); } - const Type *getVectorPtrTy(const Value *V, int vectorWidth) { - const PointerType *pointerType = dyn_cast<PointerType>(V->getType()); + Type *getVectorPtrTy(const Value *V, int vectorWidth) { + PointerType *pointerType = dyn_cast<PointerType>(V->getType()); assert(pointerType && "PointerType expected"); - const Type *scalarType = pointerType->getElementType(); + Type *scalarType = pointerType->getElementType(); VectorType *vectorType = VectorType::get(scalarType, vectorWidth); return PointerType::getUnqual(vectorType); @@ -232,7 +232,7 @@ public: Value *generateStrideOneLoad(const LoadInst *load, ValueMapT &BBMap, int size) { const Value *pointer = load->getPointerOperand(); - const Type *vectorPtrType = getVectorPtrTy(pointer, size); + Type *vectorPtrType = getVectorPtrTy(pointer, size); Value *newPointer = getOperand(pointer, BBMap); Value *VectorPtr = Builder.CreateBitCast(newPointer, vectorPtrType, "vector_ptr"); @@ -258,7 +258,7 @@ public: Value *generateStrideZeroLoad(const LoadInst *load, ValueMapT &BBMap, int size) { const Value *pointer = load->getPointerOperand(); - const Type *vectorPtrType = getVectorPtrTy(pointer, 1); + Type *vectorPtrType = getVectorPtrTy(pointer, 1); Value *newPointer = getOperand(pointer, BBMap); Value *vectorPtr = Builder.CreateBitCast(newPointer, vectorPtrType, load->getNameStr() + "_p_vec_p"); @@ -417,7 +417,7 @@ public: Value *vector = getOperand(store->getValueOperand(), BBMap, &vectorMap); if (Access.isStrideOne(scatteringDomain)) { - const Type *vectorPtrType = getVectorPtrTy(pointer, vectorWidth); + Type *vectorPtrType = getVectorPtrTy(pointer, vectorWidth); Value *newPointer = getOperand(pointer, BBMap, &vectorMap); Value *VectorPtr = Builder.CreateBitCast(newPointer, vectorPtrType, @@ -528,7 +528,7 @@ class ClastExpCodeGen { IRBuilder<> &Builder; const CharMapT *IVS; - Value *codegen(const clast_name *e, const Type *Ty) { + Value *codegen(const clast_name *e, Type *Ty) { CharMapT::const_iterator I = IVS->find(e->name); if (I != IVS->end()) @@ -537,7 +537,7 @@ class ClastExpCodeGen { llvm_unreachable("Clast name not found"); } - Value *codegen(const clast_term *e, const Type *Ty) { + Value *codegen(const clast_term *e, Type *Ty) { APInt a = APInt_from_MPZ(e->val); Value *ConstOne = ConstantInt::get(Builder.getContext(), a); @@ -551,7 +551,7 @@ class ClastExpCodeGen { return ConstOne; } - Value *codegen(const clast_binary *e, const Type *Ty) { + Value *codegen(const clast_binary *e, Type *Ty) { Value *LHS = codegen(e->LHS, Ty); APInt RHS_AP = APInt_from_MPZ(e->RHS); @@ -595,7 +595,7 @@ class ClastExpCodeGen { }; } - Value *codegen(const clast_reduction *r, const Type *Ty) { + Value *codegen(const clast_reduction *r, Type *Ty) { assert(( r->type == clast_red_min || r->type == clast_red_max || r->type == clast_red_sum) @@ -644,7 +644,7 @@ public: // // @param e The expression to calculate. // @return The Value that holds the result. - Value *codegen(const clast_expr *e, const Type *Ty) { + Value *codegen(const clast_expr *e, Type *Ty) { switch(e->type) { case clast_expr_name: return codegen((const clast_name *)e, Ty); @@ -914,7 +914,7 @@ public: SetVector<Value*> OMPDataVals) { Module *M = Builder.GetInsertBlock()->getParent()->getParent(); LLVMContext &Context = FN->getContext(); - const IntegerType *intPtrTy = TD->getIntPtrType(Context); + IntegerType *intPtrTy = TD->getIntPtrType(Context); // Store the previous basic block. BasicBlock *PrevBB = Builder.GetInsertBlock(); @@ -994,7 +994,7 @@ public: /// statement. void codegenForOpenMP(const clast_for *f) { Module *M = Builder.GetInsertBlock()->getParent()->getParent(); - const IntegerType *intPtrTy = TD->getIntPtrType(Builder.getContext()); + IntegerType *intPtrTy = TD->getIntPtrType(Builder.getContext()); Function *SubFunction = addOpenMPSubfunction(M); SetVector<Value*> OMPDataVals = createOpenMPStructValues(); @@ -1099,7 +1099,7 @@ public: TD->getIntPtrType(Builder.getContext())); APInt Stride = APInt_from_MPZ(f->stride); - const IntegerType *LoopIVType = dyn_cast<IntegerType>(LB->getType()); + IntegerType *LoopIVType = dyn_cast<IntegerType>(LB->getType()); Stride = Stride.zext(LoopIVType->getBitWidth()); Value *StrideValue = ConstantInt::get(LoopIVType, Stride); @@ -1214,7 +1214,7 @@ public: assert(i < names->nb_parameters && "Not enough parameter names"); const SCEV *Param = *PI; - const Type *Ty = Param->getType(); + Type *Ty = Param->getType(); Instruction *insertLocation = --(Builder.GetInsertBlock()->end()); Value *V = Rewriter.expandCodeFor(Param, Ty, insertLocation); |