-
Notifications
You must be signed in to change notification settings - Fork 15.2k
AMDGPU: Add statistic for number of MFMAs moved to AGPR form #153024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
arsenm
merged 2 commits into
main
from
users/arsenm/amdgpu/add-statistic-number-mfmas-moved-to-agpr
Sep 3, 2025
Merged
AMDGPU: Add statistic for number of MFMAs moved to AGPR form #153024
arsenm
merged 2 commits into
main
from
users/arsenm/amdgpu/add-statistic-number-mfmas-moved-to-agpr
Sep 3, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Aug 11, 2025
This was referenced Aug 11, 2025
Contributor
Author
Member
|
@llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) ChangesFull diff: https://github.com/llvm/llvm-project/pull/153024.diff 1 Files Affected:
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp b/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
index b71c70db5e6b3..c4a370225b606 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURewriteAGPRCopyMFMA.cpp
@@ -26,6 +26,7 @@
#include "GCNSubtarget.h"
#include "SIMachineFunctionInfo.h"
#include "SIRegisterInfo.h"
+#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/LiveIntervals.h"
#include "llvm/CodeGen/LiveRegMatrix.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
@@ -38,6 +39,9 @@ using namespace llvm;
namespace {
+STATISTIC(NumMFMAsRewrittenToAGPR,
+ "Number of MFMA instructions rewritten to use AGPR form");
+
class AMDGPURewriteAGPRCopyMFMAImpl {
MachineFunction &MF;
const GCNSubtarget &ST;
@@ -261,6 +265,7 @@ bool AMDGPURewriteAGPRCopyMFMAImpl::tryReassigningMFMAChain(
int NewMFMAOp =
AMDGPU::getMFMASrcCVDstAGPROp(RewriteCandidate->getOpcode());
RewriteCandidate->setDesc(TII.get(NewMFMAOp));
+ ++NumMFMAsRewrittenToAGPR;
}
return true;
|
This was referenced Aug 11, 2025
431cefa to
5d234cc
Compare
0dff243 to
2303793
Compare
perlfu
approved these changes
Aug 15, 2025
2303793 to
d00e587
Compare
5d234cc to
002114a
Compare
This was referenced Aug 19, 2025
002114a to
87bc565
Compare
09fa401 to
ef009cc
Compare
87bc565 to
8a87d16
Compare
ef009cc to
ce8d2ec
Compare
8a87d16 to
2a2778f
Compare
ce8d2ec to
eb8a599
Compare
2a2778f to
f2932c5
Compare
eb8a599 to
e9fb980
Compare
5d8dc9b to
968135b
Compare
e9fb980 to
0395cea
Compare
Base automatically changed from
users/arsenm/amdgpu/handle-mfma-copy-from-agpr
to
main
September 3, 2025 05:12
Previously we handled the inverse situation only.
0395cea to
0abc8f3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

No description provided.