diff options
author | Micah Villmow <villmow@gmail.com> | 2012-10-24 17:25:11 +0000 |
---|---|---|
committer | Micah Villmow <villmow@gmail.com> | 2012-10-24 17:25:11 +0000 |
commit | 51e7246cb4e9d0d5d0c3cdecc84401008c31fde7 (patch) | |
tree | 9a94461ccdb5e830c6ba40c2c1123384cf7b2cc0 /llvm/lib/Transforms | |
parent | ac9a344915a7e886fadd723b59ca83e9400659d9 (diff) | |
download | bcm5719-llvm-51e7246cb4e9d0d5d0c3cdecc84401008c31fde7.tar.gz bcm5719-llvm-51e7246cb4e9d0d5d0c3cdecc84401008c31fde7.zip |
Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this!
llvm-svn: 166596
Diffstat (limited to 'llvm/lib/Transforms')
5 files changed, 10 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 3998c8bb229..e9192e5cdd5 100644 --- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -586,8 +586,8 @@ Constant *GCOVProfiler::getIncrementIndirectCounterFunc() { Type *Int32Ty = Type::getInt32Ty(*Ctx); Type *Int64Ty = Type::getInt64Ty(*Ctx); Type *Args[] = { - Int32Ty->getPointerTo(Int32Ty), // uint32_t *predecessor - Int64Ty->getPointerTo(Int64Ty)->getPointerTo(Int64Ty) // uint64_t **counters + Int32Ty->getPointerTo(), // uint32_t *predecessor + Int64Ty->getPointerTo()->getPointerTo() // uint64_t **counters }; FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), Args, false); return M->getOrInsertFunction("__llvm_gcov_indirect_counter_increment", FTy); @@ -733,8 +733,7 @@ void GCOVProfiler::insertIndirectCounterIncrement() { Value *GEP = Builder.CreateGEP(Arg, ZExtPred); Value *Counter = Builder.CreateLoad(GEP, "counter"); Cond = Builder.CreateICmpEQ(Counter, - Constant::getNullValue( - Int64Ty->getPointerTo(Counter->getType()))); + Constant::getNullValue(Int64Ty->getPointerTo())); Builder.CreateCondBr(Cond, Exit, CounterEnd); // ++*counter; diff --git a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp index 40aa2274a4f..de57cd17348 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp @@ -134,8 +134,7 @@ void llvm::InsertProfilingShutdownCall(Function *Callee, Module *Mod) { // types. Type *GlobalDtorElems[2] = { Type::getInt32Ty(Mod->getContext()), - FunctionType::get(Type::getVoidTy(Mod->getContext()), false) - ->getPointerTo() + FunctionType::get(Type::getVoidTy(Mod->getContext()), false)->getPointerTo() }; StructType *GlobalDtorElemTy = StructType::get(Mod->getContext(), GlobalDtorElems, false); diff --git a/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp index 8536e9a41a2..c6244a55c93 100644 --- a/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp @@ -375,7 +375,7 @@ bool ThreadSanitizer::instrumentAtomic(Instruction *I) { const size_t ByteSize = 1 << Idx; const size_t BitSize = ByteSize * 8; Type *Ty = Type::getIntNTy(IRB.getContext(), BitSize); - Type *PtrTy = Ty->getPointerTo(Addr->getType()); + Type *PtrTy = Ty->getPointerTo(); Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy), createOrdering(&IRB, LI->getOrdering())}; CallInst *C = CallInst::Create(TsanAtomicLoad[Idx], @@ -390,7 +390,7 @@ bool ThreadSanitizer::instrumentAtomic(Instruction *I) { const size_t ByteSize = 1 << Idx; const size_t BitSize = ByteSize * 8; Type *Ty = Type::getIntNTy(IRB.getContext(), BitSize); - Type *PtrTy = Ty->getPointerTo(Addr->getType()); + Type *PtrTy = Ty->getPointerTo(); Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy), IRB.CreateIntCast(SI->getValueOperand(), Ty, false), createOrdering(&IRB, SI->getOrdering())}; diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp index adf7e7af83e..71c62257e7f 100644 --- a/llvm/lib/Transforms/Scalar/SROA.cpp +++ b/llvm/lib/Transforms/Scalar/SROA.cpp @@ -2763,9 +2763,9 @@ private: : II.getRawDest()->getType(); if (!EmitMemCpy) { if (IsVectorElement) - OtherPtrTy = VecTy->getElementType()->getPointerTo(OtherPtrTy); + OtherPtrTy = VecTy->getElementType()->getPointerTo(); else if (IntTy && !IsWholeAlloca) - OtherPtrTy = SubIntTy->getPointerTo(OtherPtrTy); + OtherPtrTy = SubIntTy->getPointerTo(); else OtherPtrTy = NewAI.getType(); } diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 4cd171ab140..bead39225b8 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -777,7 +777,7 @@ SingleBlockLoopVectorizer::vectorizeLoop(LoopVectorizationLegality *Legal) { GetElementPtrInst *Gep2 = cast<GetElementPtrInst>(Gep->clone()); Gep2->setOperand(NumOperands - 1, LastIndex); Ptr = Builder.Insert(Gep2); - Ptr = Builder.CreateBitCast(Ptr, StTy->getPointerTo(Ptr->getType())); + Ptr = Builder.CreateBitCast(Ptr, StTy->getPointerTo()); Value *Val = getVectorValue(SI->getValueOperand()); Builder.CreateStore(Val, Ptr)->setAlignment(Alignment); break; @@ -806,7 +806,7 @@ SingleBlockLoopVectorizer::vectorizeLoop(LoopVectorizationLegality *Legal) { GetElementPtrInst *Gep2 = cast<GetElementPtrInst>(Gep->clone()); Gep2->setOperand(NumOperands - 1, LastIndex); Ptr = Builder.Insert(Gep2); - Ptr = Builder.CreateBitCast(Ptr, RetTy->getPointerTo(Ptr->getType())); + Ptr = Builder.CreateBitCast(Ptr, RetTy->getPointerTo()); LI = Builder.CreateLoad(Ptr); LI->setAlignment(Alignment); // Use this vector value for all users of the load. |