[llvm] [NFC] [AMDGPU] Added 2 options to rewrite-agpr-copy-mfma for debugging. (PR #189437)
Dhruva Chakrabarti via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 8 22:12:14 PDT 2026
================
@@ -35,11 +35,22 @@
#include "llvm/CodeGen/SlotIndexes.h"
#include "llvm/CodeGen/VirtRegMap.h"
#include "llvm/InitializePasses.h"
+#include "llvm/Support/CommandLine.h"
using namespace llvm;
#define DEBUG_TYPE "amdgpu-rewrite-agpr-copy-mfma"
+static cl::opt<bool> DisableRewriteAGPRCopyMFMA(
+ "amdgpu-disable-rewrite-agpr-copy-mfma", cl::Hidden,
+ cl::desc("Disable the post-RA AGPR copy MFMA rewriting pass."),
+ cl::init(false));
+
+static cl::opt<unsigned> RewriteAGPRCopyMFMALimit(
+ "amdgpu-rewrite-agpr-copy-mfma-limit", cl::Hidden,
+ cl::desc("Maximum number of MFMA instructions to rewrite to AGPR form."),
+ cl::init(~0U));
+
namespace {
STATISTIC(NumMFMAsRewrittenToAGPR,
----------------
dhruvachak wrote:
I would prefer keeping the STATISTIC so that -stats can be used. The pattern that I have currently exists in other sources, e.g. in Stack Slot Coloring.
https://github.com/llvm/llvm-project/pull/189437
More information about the llvm-commits
mailing list