@@ -608,43 +608,33 @@ class IRBuilderBase {
608
608
// / Create and insert a memset to the specified pointer and the
609
609
// / specified value.
610
610
// /
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.
614
613
CallInst *CreateMemSet (Value *Ptr, Value *Val, uint64_t Size,
615
614
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);
620
617
}
621
618
622
619
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());
626
622
627
623
CallInst *CreateMemSetInline (Value *Dst, MaybeAlign DstAlign, Value *Val,
628
624
Value *Size, bool IsVolatile = false ,
629
- MDNode *TBAATag = nullptr ,
630
- MDNode *ScopeTag = nullptr ,
631
- MDNode *NoAliasTag = nullptr );
625
+ const AAMDNodes &AAInfo = AAMDNodes());
632
626
633
627
// / Create and insert an element unordered-atomic memset of the region of
634
628
// / memory starting at the given pointer to the given value.
635
629
// /
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);
648
638
}
649
639
650
640
CallInst *CreateMalloc (Type *IntPtrTy, Type *AllocTy, Value *AllocSize,
@@ -662,88 +652,72 @@ class IRBuilderBase {
662
652
// / Generate the IR for a call to the builtin free function.
663
653
CallInst *CreateFree (Value *Source, ArrayRef<OperandBundleDef> Bundles = {});
664
654
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());
671
659
672
660
// / Create and insert a memcpy between the specified pointers.
673
661
// /
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.
676
664
// / and noalias tags.
677
665
CallInst *CreateMemCpy (Value *Dst, MaybeAlign DstAlign, Value *Src,
678
666
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()) {
683
669
return CreateMemCpy (Dst, DstAlign, Src, SrcAlign, getInt64 (Size),
684
- isVolatile, TBAATag, TBAAStructTag, ScopeTag,
685
- NoAliasTag);
670
+ isVolatile, AAInfo);
686
671
}
687
672
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() );
693
678
694
679
CallInst *CreateMemCpy (Value *Dst, MaybeAlign DstAlign, Value *Src,
695
680
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()) {
700
683
return CreateMemTransferInst (Intrinsic::memcpy, Dst, DstAlign, Src,
701
- SrcAlign, Size, isVolatile, TBAATag,
702
- TBAAStructTag, ScopeTag, NoAliasTag);
684
+ SrcAlign, Size, isVolatile, AAInfo);
703
685
}
704
686
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()) {
710
691
return CreateMemTransferInst (Intrinsic::memcpy_inline, Dst, DstAlign, Src,
711
- SrcAlign, Size, isVolatile, TBAATag,
712
- TBAAStructTag, ScopeTag, NoAliasTag);
692
+ SrcAlign, Size, isVolatile, AAInfo);
713
693
}
714
694
715
695
// / Create and insert an element unordered-atomic memcpy between the
716
696
// / specified pointers.
717
697
// /
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.
719
700
// /
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.
723
703
CallInst *CreateElementUnorderedAtomicMemCpy (
724
704
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());
728
706
729
707
CallInst *CreateMemMove (Value *Dst, MaybeAlign DstAlign, Value *Src,
730
708
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()) {
734
711
return CreateMemMove (Dst, DstAlign, Src, SrcAlign, getInt64 (Size),
735
- isVolatile, TBAATag, ScopeTag, NoAliasTag );
712
+ isVolatile, AAInfo );
736
713
}
737
714
738
715
CallInst *CreateMemMove (Value *Dst, MaybeAlign DstAlign, Value *Src,
739
716
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()) {
743
719
return CreateMemTransferInst (Intrinsic::memmove, Dst, DstAlign, Src,
744
- SrcAlign, Size, isVolatile, TBAATag,
745
- /* TBAAStructTag=*/ nullptr , ScopeTag,
746
- NoAliasTag);
720
+ SrcAlign, Size, isVolatile, AAInfo);
747
721
}
748
722
749
723
// / \brief Create and insert an element unordered-atomic memmove between the
@@ -752,14 +726,11 @@ class IRBuilderBase {
752
726
// / DstAlign/SrcAlign are the alignments of the Dst/Src pointers,
753
727
// / respectively.
754
728
// /
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.
758
731
CallInst *CreateElementUnorderedAtomicMemMove (
759
732
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());
763
734
764
735
private:
765
736
CallInst *getReductionIntrinsic (Intrinsic::ID ID, Value *Src);
0 commit comments