@@ -75,7 +75,7 @@ static CallInst *ReplaceCallWith(const char *NewFn, CallInst *CI,
75
75
Constant* FCache = M->getOrInsertFunction (NewFn,
76
76
FunctionType::get (RetTy, ParamTys, false ));
77
77
78
- IRBuilder<> Builder (CI->getParent (), CI);
78
+ IRBuilder<> Builder (CI->getParent (), CI-> getIterator () );
79
79
SmallVector<Value *, 8 > Args (ArgBegin, ArgEnd);
80
80
CallInst *NewCI = Builder.CreateCall (FCache, Args);
81
81
NewCI->setName (CI->getName ());
@@ -167,8 +167,8 @@ static Value *LowerBSWAP(LLVMContext &Context, Value *V, Instruction *IP) {
167
167
assert (V->getType ()->isIntegerTy () && " Can't bswap a non-integer type!" );
168
168
169
169
unsigned BitSize = V->getType ()->getPrimitiveSizeInBits ();
170
-
171
- IRBuilder<> Builder (IP-> getParent (), IP );
170
+
171
+ IRBuilder<> Builder (IP);
172
172
173
173
switch (BitSize) {
174
174
default : llvm_unreachable (" Unhandled type size of value to byteswap!" );
@@ -268,7 +268,7 @@ static Value *LowerCTPOP(LLVMContext &Context, Value *V, Instruction *IP) {
268
268
0x0000FFFF0000FFFFULL , 0x00000000FFFFFFFFULL
269
269
};
270
270
271
- IRBuilder<> Builder (IP-> getParent (), IP );
271
+ IRBuilder<> Builder (IP);
272
272
273
273
unsigned BitSize = V->getType ()->getPrimitiveSizeInBits ();
274
274
unsigned WordSize = (BitSize + 63 ) / 64 ;
@@ -301,7 +301,7 @@ static Value *LowerCTPOP(LLVMContext &Context, Value *V, Instruction *IP) {
301
301
// / instruction IP.
302
302
static Value *LowerCTLZ (LLVMContext &Context, Value *V, Instruction *IP) {
303
303
304
- IRBuilder<> Builder (IP-> getParent (), IP );
304
+ IRBuilder<> Builder (IP);
305
305
306
306
unsigned BitSize = V->getType ()->getPrimitiveSizeInBits ();
307
307
for (unsigned i = 1 ; i < BitSize; i <<= 1 ) {
@@ -338,7 +338,7 @@ static void ReplaceFPIntrinsicWithCall(CallInst *CI, const char *Fname,
338
338
}
339
339
340
340
void IntrinsicLowering::LowerIntrinsicCall (CallInst *CI) {
341
- IRBuilder<> Builder (CI-> getParent (), CI );
341
+ IRBuilder<> Builder (CI);
342
342
LLVMContext &Context = CI->getContext ();
343
343
344
344
const Function *Callee = CI->getCalledFunction ();
0 commit comments