mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 07:24:47 +00:00
Add IRBuilder code for adding !tbaa.struct metadata tags to llvm.memcpy calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -80,7 +80,7 @@ CreateMemSet(Value *Ptr, Value *Val, Value *Size, unsigned Align,
|
||||
|
||||
CallInst *IRBuilderBase::
|
||||
CreateMemCpy(Value *Dst, Value *Src, Value *Size, unsigned Align,
|
||||
bool isVolatile, MDNode *TBAATag) {
|
||||
bool isVolatile, MDNode *TBAATag, MDNode *TBAAStructTag) {
|
||||
Dst = getCastedInt8PtrValue(Dst);
|
||||
Src = getCastedInt8PtrValue(Src);
|
||||
|
||||
@@ -94,6 +94,10 @@ CreateMemCpy(Value *Dst, Value *Src, Value *Size, unsigned Align,
|
||||
// Set the TBAA info if present.
|
||||
if (TBAATag)
|
||||
CI->setMetadata(LLVMContext::MD_tbaa, TBAATag);
|
||||
|
||||
// Set the TBAA Struct info if present.
|
||||
if (TBAAStructTag)
|
||||
CI->setMetadata(LLVMContext::MD_tbaa_struct, TBAAStructTag);
|
||||
|
||||
return CI;
|
||||
}
|
||||
|
Reference in New Issue
Block a user