aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorMicah Villmow <villmow@gmail.com>2012-10-24 17:20:04 +0000
committerMicah Villmow <villmow@gmail.com>2012-10-24 17:20:04 +0000
commit2f87640b86315beab8a5671cc23f524e59c58bd3 (patch)
treecb18e28b2d6aa7b36dcca2f78cab41f315409d51 /lib/Transforms
parentaa76e9e2cf50af190de90bc778b7f7e42ef9ceff (diff)
Delete a directory that wasn't supposed to be checked in yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166591 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Instrumentation/GCOVProfiling.cpp7
-rw-r--r--lib/Transforms/Instrumentation/ProfilingUtils.cpp3
-rw-r--r--lib/Transforms/Instrumentation/ThreadSanitizer.cpp4
-rw-r--r--lib/Transforms/Scalar/SROA.cpp4
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp4
5 files changed, 12 insertions, 10 deletions
diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp
index e9192e5cdd..3998c8bb22 100644
--- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+++ b/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(), // uint32_t *predecessor
- Int64Ty->getPointerTo()->getPointerTo() // uint64_t **counters
+ Int32Ty->getPointerTo(Int32Ty), // uint32_t *predecessor
+ Int64Ty->getPointerTo(Int64Ty)->getPointerTo(Int64Ty) // uint64_t **counters
};
FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), Args, false);
return M->getOrInsertFunction("__llvm_gcov_indirect_counter_increment", FTy);
@@ -733,7 +733,8 @@ void GCOVProfiler::insertIndirectCounterIncrement() {
Value *GEP = Builder.CreateGEP(Arg, ZExtPred);
Value *Counter = Builder.CreateLoad(GEP, "counter");
Cond = Builder.CreateICmpEQ(Counter,
- Constant::getNullValue(Int64Ty->getPointerTo()));
+ Constant::getNullValue(
+ Int64Ty->getPointerTo(Counter->getType())));
Builder.CreateCondBr(Cond, Exit, CounterEnd);
// ++*counter;
diff --git a/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/lib/Transforms/Instrumentation/ProfilingUtils.cpp
index de57cd1734..40aa2274a4 100644
--- a/lib/Transforms/Instrumentation/ProfilingUtils.cpp
+++ b/lib/Transforms/Instrumentation/ProfilingUtils.cpp
@@ -134,7 +134,8 @@ 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/lib/Transforms/Instrumentation/ThreadSanitizer.cpp b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
index c6244a55c9..8536e9a41a 100644
--- a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
+++ b/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();
+ Type *PtrTy = Ty->getPointerTo(Addr->getType());
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();
+ Type *PtrTy = Ty->getPointerTo(Addr->getType());
Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
IRB.CreateIntCast(SI->getValueOperand(), Ty, false),
createOrdering(&IRB, SI->getOrdering())};
diff --git a/lib/Transforms/Scalar/SROA.cpp b/lib/Transforms/Scalar/SROA.cpp
index 71c62257e7..adf7e7af83 100644
--- a/lib/Transforms/Scalar/SROA.cpp
+++ b/lib/Transforms/Scalar/SROA.cpp
@@ -2763,9 +2763,9 @@ private:
: II.getRawDest()->getType();
if (!EmitMemCpy) {
if (IsVectorElement)
- OtherPtrTy = VecTy->getElementType()->getPointerTo();
+ OtherPtrTy = VecTy->getElementType()->getPointerTo(OtherPtrTy);
else if (IntTy && !IsWholeAlloca)
- OtherPtrTy = SubIntTy->getPointerTo();
+ OtherPtrTy = SubIntTy->getPointerTo(OtherPtrTy);
else
OtherPtrTy = NewAI.getType();
}
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index bead39225b..4cd171ab14 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/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 = Builder.CreateBitCast(Ptr, StTy->getPointerTo(Ptr->getType()));
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 = Builder.CreateBitCast(Ptr, RetTy->getPointerTo(Ptr->getType()));
LI = Builder.CreateLoad(Ptr);
LI->setAlignment(Alignment);
// Use this vector value for all users of the load.