summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/IRBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/IRBuilder.cpp')
-rw-r--r--llvm/lib/IR/IRBuilder.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/llvm/lib/IR/IRBuilder.cpp b/llvm/lib/IR/IRBuilder.cpp
index b6df7b530a9..405a56bfb31 100644
--- a/llvm/lib/IR/IRBuilder.cpp
+++ b/llvm/lib/IR/IRBuilder.cpp
@@ -62,7 +62,7 @@ Value *IRBuilderBase::getCastedInt8PtrValue(Value *Ptr) {
auto *PT = cast<PointerType>(Ptr->getType());
if (PT->getElementType()->isIntegerTy(8))
return Ptr;
-
+
// Otherwise, we need to insert a bitcast.
PT = getInt8PtrTy(PT->getAddressSpace());
BitCastInst *BCI = new BitCastInst(Ptr, PT, "");
@@ -80,7 +80,7 @@ static CallInst *createCallHelper(Value *Callee, ArrayRef<Value *> Ops,
CI->copyFastMathFlags(FMFSource);
Builder->GetInsertBlock()->getInstList().insert(Builder->GetInsertPoint(),CI);
Builder->SetInstDebugLocation(CI);
- return CI;
+ return CI;
}
static InvokeInst *createInvokeHelper(Value *Invokee, BasicBlock *NormalDest,
@@ -105,7 +105,7 @@ CreateMemSet(Value *Ptr, Value *Val, Value *Size, unsigned Align,
Type *Tys[] = { Ptr->getType(), Size->getType() };
Module *M = BB->getParent()->getParent();
Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::memset, Tys);
-
+
CallInst *CI = createCallHelper(TheFn, Ops, this);
if (Align > 0)
@@ -117,7 +117,7 @@ CreateMemSet(Value *Ptr, Value *Val, Value *Size, unsigned Align,
if (ScopeTag)
CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag);
-
+
if (NoAliasTag)
CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag);
@@ -167,7 +167,7 @@ CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
Type *Tys[] = { Dst->getType(), Src->getType(), Size->getType() };
Module *M = BB->getParent()->getParent();
Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::memcpy, Tys);
-
+
CallInst *CI = createCallHelper(TheFn, Ops, this);
auto* MCI = cast<MemCpyInst>(CI);
@@ -183,14 +183,14 @@ CreateMemCpy(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
// Set the TBAA Struct info if present.
if (TBAAStructTag)
CI->setMetadata(LLVMContext::MD_tbaa_struct, TBAAStructTag);
-
+
if (ScopeTag)
CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag);
-
+
if (NoAliasTag)
CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag);
- return CI;
+ return CI;
}
CallInst *IRBuilderBase::CreateElementUnorderedAtomicMemCpy(
@@ -247,7 +247,7 @@ CreateMemMove(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
Type *Tys[] = { Dst->getType(), Src->getType(), Size->getType() };
Module *M = BB->getParent()->getParent();
Value *TheFn = Intrinsic::getDeclaration(M, Intrinsic::memmove, Tys);
-
+
CallInst *CI = createCallHelper(TheFn, Ops, this);
auto *MMI = cast<MemMoveInst>(CI);
@@ -259,14 +259,14 @@ CreateMemMove(Value *Dst, unsigned DstAlign, Value *Src, unsigned SrcAlign,
// Set the TBAA info if present.
if (TBAATag)
CI->setMetadata(LLVMContext::MD_tbaa, TBAATag);
-
+
if (ScopeTag)
CI->setMetadata(LLVMContext::MD_alias_scope, ScopeTag);
-
+
if (NoAliasTag)
CI->setMetadata(LLVMContext::MD_noalias, NoAliasTag);
-
- return CI;
+
+ return CI;
}
CallInst *IRBuilderBase::CreateElementUnorderedAtomicMemMove(
OpenPOWER on IntegriCloud