@@ -608,43 +608,33 @@ class IRBuilderBase {
608608 // / Create and insert a memset to the specified pointer and the
609609 // / specified value.
610610 // /
611- // / If the pointer isn't an i8*, it will be converted. If a TBAA tag is
612- // / specified, it will be added to the instruction. Likewise with alias.scope
613- // / and noalias tags.
611+ // / If the pointer isn't an i8*, it will be converted. If alias metadata is
612+ // / specified, it will be added to the instruction.
614613 CallInst *CreateMemSet (Value *Ptr, Value *Val, uint64_t Size,
615614 MaybeAlign Align, bool isVolatile = false ,
616- MDNode *TBAATag = nullptr , MDNode *ScopeTag = nullptr ,
617- MDNode *NoAliasTag = nullptr ) {
618- return CreateMemSet (Ptr, Val, getInt64 (Size), Align, isVolatile,
619- TBAATag, ScopeTag, NoAliasTag);
615+ const AAMDNodes &AAInfo = AAMDNodes()) {
616+ return CreateMemSet (Ptr, Val, getInt64 (Size), Align, isVolatile, AAInfo);
620617 }
621618
622619 CallInst *CreateMemSet (Value *Ptr, Value *Val, Value *Size, MaybeAlign Align,
623- bool isVolatile = false , MDNode *TBAATag = nullptr ,
624- MDNode *ScopeTag = nullptr ,
625- MDNode *NoAliasTag = nullptr );
620+ bool isVolatile = false ,
621+ const AAMDNodes &AAInfo = AAMDNodes());
626622
627623 CallInst *CreateMemSetInline (Value *Dst, MaybeAlign DstAlign, Value *Val,
628624 Value *Size, bool IsVolatile = false ,
629- MDNode *TBAATag = nullptr ,
630- MDNode *ScopeTag = nullptr ,
631- MDNode *NoAliasTag = nullptr );
625+ const AAMDNodes &AAInfo = AAMDNodes());
632626
633627 // / Create and insert an element unordered-atomic memset of the region of
634628 // / memory starting at the given pointer to the given value.
635629 // /
636- // / If the pointer isn't an i8*, it will be converted. If a TBAA tag is
637- // / specified, it will be added to the instruction. Likewise with alias.scope
638- // / and noalias tags.
639- CallInst *CreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val,
640- uint64_t Size, Align Alignment,
641- uint32_t ElementSize,
642- MDNode *TBAATag = nullptr ,
643- MDNode *ScopeTag = nullptr ,
644- MDNode *NoAliasTag = nullptr ) {
645- return CreateElementUnorderedAtomicMemSet (Ptr, Val, getInt64 (Size),
646- Align (Alignment), ElementSize,
647- TBAATag, ScopeTag, NoAliasTag);
630+ // / If the pointer isn't an i8*, it will be converted. If alias metadata is
631+ // / specified, it will be added to the instruction.
632+ CallInst *
633+ CreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val, uint64_t Size,
634+ Align Alignment, uint32_t ElementSize,
635+ const AAMDNodes &AAInfo = AAMDNodes()) {
636+ return CreateElementUnorderedAtomicMemSet (
637+ Ptr, Val, getInt64 (Size), Align (Alignment), ElementSize, AAInfo);
648638 }
649639
650640 CallInst *CreateMalloc (Type *IntPtrTy, Type *AllocTy, Value *AllocSize,
@@ -662,88 +652,72 @@ class IRBuilderBase {
662652 // / Generate the IR for a call to the builtin free function.
663653 CallInst *CreateFree (Value *Source, ArrayRef<OperandBundleDef> Bundles = {});
664654
665- CallInst *CreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val,
666- Value *Size, Align Alignment,
667- uint32_t ElementSize,
668- MDNode *TBAATag = nullptr ,
669- MDNode *ScopeTag = nullptr ,
670- MDNode *NoAliasTag = nullptr );
655+ CallInst *
656+ CreateElementUnorderedAtomicMemSet (Value *Ptr, Value *Val, Value *Size,
657+ Align Alignment, uint32_t ElementSize,
658+ const AAMDNodes &AAInfo = AAMDNodes());
671659
672660 // / Create and insert a memcpy between the specified pointers.
673661 // /
674- // / If the pointers aren't i8*, they will be converted. If a TBAA tag is
675- // / specified, it will be added to the instruction. Likewise with alias.scope
662+ // / If the pointers aren't i8*, they will be converted. If alias metadata is
663+ // / specified, it will be added to the instruction.
676664 // / and noalias tags.
677665 CallInst *CreateMemCpy (Value *Dst, MaybeAlign DstAlign, Value *Src,
678666 MaybeAlign SrcAlign, uint64_t Size,
679- bool isVolatile = false , MDNode *TBAATag = nullptr ,
680- MDNode *TBAAStructTag = nullptr ,
681- MDNode *ScopeTag = nullptr ,
682- MDNode *NoAliasTag = nullptr ) {
667+ bool isVolatile = false ,
668+ const AAMDNodes &AAInfo = AAMDNodes()) {
683669 return CreateMemCpy (Dst, DstAlign, Src, SrcAlign, getInt64 (Size),
684- isVolatile, TBAATag, TBAAStructTag, ScopeTag,
685- NoAliasTag);
670+ isVolatile, AAInfo);
686671 }
687672
688- CallInst *CreateMemTransferInst (
689- Intrinsic::ID IntrID, Value *Dst, MaybeAlign DstAlign, Value *Src,
690- MaybeAlign SrcAlign, Value *Size, bool isVolatile = false ,
691- MDNode *TBAATag = nullptr , MDNode *TBAAStructTag = nullptr ,
692- MDNode *ScopeTag = nullptr , MDNode *NoAliasTag = nullptr );
673+ CallInst *CreateMemTransferInst (Intrinsic::ID IntrID, Value *Dst,
674+ MaybeAlign DstAlign, Value *Src,
675+ MaybeAlign SrcAlign, Value *Size,
676+ bool isVolatile = false ,
677+ const AAMDNodes &AAInfo = AAMDNodes() );
693678
694679 CallInst *CreateMemCpy (Value *Dst, MaybeAlign DstAlign, Value *Src,
695680 MaybeAlign SrcAlign, Value *Size,
696- bool isVolatile = false , MDNode *TBAATag = nullptr ,
697- MDNode *TBAAStructTag = nullptr ,
698- MDNode *ScopeTag = nullptr ,
699- MDNode *NoAliasTag = nullptr ) {
681+ bool isVolatile = false ,
682+ const AAMDNodes &AAInfo = AAMDNodes()) {
700683 return CreateMemTransferInst (Intrinsic::memcpy, Dst, DstAlign, Src,
701- SrcAlign, Size, isVolatile, TBAATag,
702- TBAAStructTag, ScopeTag, NoAliasTag);
684+ SrcAlign, Size, isVolatile, AAInfo);
703685 }
704686
705- CallInst *
706- CreateMemCpyInline (Value *Dst, MaybeAlign DstAlign, Value *Src,
707- MaybeAlign SrcAlign, Value *Size, bool isVolatile = false ,
708- MDNode *TBAATag = nullptr , MDNode *TBAAStructTag = nullptr ,
709- MDNode *ScopeTag = nullptr , MDNode *NoAliasTag = nullptr ) {
687+ CallInst *CreateMemCpyInline (Value *Dst, MaybeAlign DstAlign, Value *Src,
688+ MaybeAlign SrcAlign, Value *Size,
689+ bool isVolatile = false ,
690+ const AAMDNodes &AAInfo = AAMDNodes()) {
710691 return CreateMemTransferInst (Intrinsic::memcpy_inline, Dst, DstAlign, Src,
711- SrcAlign, Size, isVolatile, TBAATag,
712- TBAAStructTag, ScopeTag, NoAliasTag);
692+ SrcAlign, Size, isVolatile, AAInfo);
713693 }
714694
715695 // / Create and insert an element unordered-atomic memcpy between the
716696 // / specified pointers.
717697 // /
718- // / DstAlign/SrcAlign are the alignments of the Dst/Src pointers, respectively.
698+ // / DstAlign/SrcAlign are the alignments of the Dst/Src pointers,
699+ // / respectively.
719700 // /
720- // / If the pointers aren't i8*, they will be converted. If a TBAA tag is
721- // / specified, it will be added to the instruction. Likewise with alias.scope
722- // / and noalias tags.
701+ // / If the pointers aren't i8*, they will be converted. If alias metadata is
702+ // / specified, it will be added to the instruction.
723703 CallInst *CreateElementUnorderedAtomicMemCpy (
724704 Value *Dst, Align DstAlign, Value *Src, Align SrcAlign, Value *Size,
725- uint32_t ElementSize, MDNode *TBAATag = nullptr ,
726- MDNode *TBAAStructTag = nullptr , MDNode *ScopeTag = nullptr ,
727- MDNode *NoAliasTag = nullptr );
705+ uint32_t ElementSize, const AAMDNodes &AAInfo = AAMDNodes());
728706
729707 CallInst *CreateMemMove (Value *Dst, MaybeAlign DstAlign, Value *Src,
730708 MaybeAlign SrcAlign, uint64_t Size,
731- bool isVolatile = false , MDNode *TBAATag = nullptr ,
732- MDNode *ScopeTag = nullptr ,
733- MDNode *NoAliasTag = nullptr ) {
709+ bool isVolatile = false ,
710+ const AAMDNodes &AAInfo = AAMDNodes()) {
734711 return CreateMemMove (Dst, DstAlign, Src, SrcAlign, getInt64 (Size),
735- isVolatile, TBAATag, ScopeTag, NoAliasTag );
712+ isVolatile, AAInfo );
736713 }
737714
738715 CallInst *CreateMemMove (Value *Dst, MaybeAlign DstAlign, Value *Src,
739716 MaybeAlign SrcAlign, Value *Size,
740- bool isVolatile = false , MDNode *TBAATag = nullptr ,
741- MDNode *ScopeTag = nullptr ,
742- MDNode *NoAliasTag = nullptr ) {
717+ bool isVolatile = false ,
718+ const AAMDNodes &AAInfo = AAMDNodes()) {
743719 return CreateMemTransferInst (Intrinsic::memmove, Dst, DstAlign, Src,
744- SrcAlign, Size, isVolatile, TBAATag,
745- /* TBAAStructTag=*/ nullptr , ScopeTag,
746- NoAliasTag);
720+ SrcAlign, Size, isVolatile, AAInfo);
747721 }
748722
749723 // / \brief Create and insert an element unordered-atomic memmove between the
@@ -752,14 +726,11 @@ class IRBuilderBase {
752726 // / DstAlign/SrcAlign are the alignments of the Dst/Src pointers,
753727 // / respectively.
754728 // /
755- // / If the pointers aren't i8*, they will be converted. If a TBAA tag is
756- // / specified, it will be added to the instruction. Likewise with alias.scope
757- // / and noalias tags.
729+ // / If the pointers aren't i8*, they will be converted. If alias metadata is
730+ // / specified, it will be added to the instruction.
758731 CallInst *CreateElementUnorderedAtomicMemMove (
759732 Value *Dst, Align DstAlign, Value *Src, Align SrcAlign, Value *Size,
760- uint32_t ElementSize, MDNode *TBAATag = nullptr ,
761- MDNode *TBAAStructTag = nullptr , MDNode *ScopeTag = nullptr ,
762- MDNode *NoAliasTag = nullptr );
733+ uint32_t ElementSize, const AAMDNodes &AAInfo = AAMDNodes());
763734
764735private:
765736 CallInst *getReductionIntrinsic (Intrinsic::ID ID, Value *Src);
0 commit comments