[PATCH] D126058: [X86][AMX][NFC] Refactor X86LowerAMXCast.cpp
LuoYuanke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 04:32:33 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd5999bd3f752: [X86][AMX][NFC] Refactor X86LowerAMXCast.cpp (authored by LuoYuanke).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126058/new/
https://reviews.llvm.org/D126058
Files:
llvm/lib/Target/X86/X86LowerAMXType.cpp
Index: llvm/lib/Target/X86/X86LowerAMXType.cpp
===================================================================
--- llvm/lib/Target/X86/X86LowerAMXType.cpp
+++ llvm/lib/Target/X86/X86LowerAMXType.cpp
@@ -703,6 +703,9 @@
public:
X86LowerAMXCast(Function &F) : Func(F) {}
+ void combineCastStore(IntrinsicInst *Cast, StoreInst *ST);
+ void combineLoadCast(IntrinsicInst *Cast, LoadInst *LD);
+ bool combineLdSt(SmallVectorImpl<Instruction *> &Casts);
bool combineAMXcast(TargetLibraryInfo *TLI);
bool transformAMXCast(IntrinsicInst *AMXCast);
bool transformAllAMXCast();
@@ -913,7 +916,7 @@
// -->
// call void @llvm.x86.tilestored64.internal(i16 %row, i16 %col, i8* %p,
// i64 64, x86_amx %42)
-static void combineCastStore(IntrinsicInst *Cast, StoreInst *ST) {
+void X86LowerAMXCast::combineCastStore(IntrinsicInst *Cast, StoreInst *ST) {
Value *Tile = Cast->getOperand(0);
// TODO: If it is cast intrinsic or phi node, we can propagate the
// shape information through def-use chain.
@@ -939,7 +942,7 @@
// -->
// %66 = call x86_amx @llvm.x86.tileloadd64.internal(i16 %row, i16 %col,
// i8* %p, i64 64)
-static void combineLoadCast(IntrinsicInst *Cast, LoadInst *LD) {
+void X86LowerAMXCast::combineLoadCast(IntrinsicInst *Cast, LoadInst *LD) {
Value *Row = nullptr, *Col = nullptr;
Use &U = *(Cast->use_begin());
unsigned OpNo = U.getOperandNo();
@@ -961,7 +964,7 @@
Cast->replaceAllUsesWith(NewInst);
}
-static bool combineLdSt(SmallVectorImpl<Instruction *> &Casts) {
+bool X86LowerAMXCast::combineLdSt(SmallVectorImpl<Instruction *> &Casts) {
bool Change = false;
for (auto *Cast : Casts) {
auto *II = cast<IntrinsicInst>(Cast);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126058.430939.patch
Type: text/x-patch
Size: 1788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220520/c7068f4d/attachment.bin>
More information about the llvm-commits
mailing list