@@ -703,6 +703,9 @@ class X86LowerAMXCast {
703
703
704
704
public:
705
705
X86LowerAMXCast (Function &F) : Func(F) {}
706
+ void combineCastStore (IntrinsicInst *Cast, StoreInst *ST);
707
+ void combineLoadCast (IntrinsicInst *Cast, LoadInst *LD);
708
+ bool combineLdSt (SmallVectorImpl<Instruction *> &Casts);
706
709
bool combineAMXcast (TargetLibraryInfo *TLI);
707
710
bool transformAMXCast (IntrinsicInst *AMXCast);
708
711
bool transformAllAMXCast ();
@@ -913,7 +916,7 @@ bool X86LowerAMXCast::optimizeAMXCastFromPhi(
913
916
// -->
914
917
// call void @llvm.x86.tilestored64.internal(i16 %row, i16 %col, i8* %p,
915
918
// i64 64, x86_amx %42)
916
- static void combineCastStore (IntrinsicInst *Cast, StoreInst *ST) {
919
+ void X86LowerAMXCast:: combineCastStore (IntrinsicInst *Cast, StoreInst *ST) {
917
920
Value *Tile = Cast->getOperand (0 );
918
921
// TODO: If it is cast intrinsic or phi node, we can propagate the
919
922
// shape information through def-use chain.
@@ -939,7 +942,7 @@ static void combineCastStore(IntrinsicInst *Cast, StoreInst *ST) {
939
942
// -->
940
943
// %66 = call x86_amx @llvm.x86.tileloadd64.internal(i16 %row, i16 %col,
941
944
// i8* %p, i64 64)
942
- static void combineLoadCast (IntrinsicInst *Cast, LoadInst *LD) {
945
+ void X86LowerAMXCast:: combineLoadCast (IntrinsicInst *Cast, LoadInst *LD) {
943
946
Value *Row = nullptr , *Col = nullptr ;
944
947
Use &U = *(Cast->use_begin ());
945
948
unsigned OpNo = U.getOperandNo ();
@@ -961,7 +964,7 @@ static void combineLoadCast(IntrinsicInst *Cast, LoadInst *LD) {
961
964
Cast->replaceAllUsesWith (NewInst);
962
965
}
963
966
964
- static bool combineLdSt (SmallVectorImpl<Instruction *> &Casts) {
967
+ bool X86LowerAMXCast:: combineLdSt (SmallVectorImpl<Instruction *> &Casts) {
965
968
bool Change = false ;
966
969
for (auto *Cast : Casts) {
967
970
auto *II = cast<IntrinsicInst>(Cast);
0 commit comments