[llvm] [AMDGPU] Enable CSE in the GlobalISel post-legalizer combiner (PR #217258)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 03:18:52 PDT 2026
================
@@ -55,6 +57,26 @@ static cl::opt<bool> EnableNewLegality(
static constexpr unsigned MaxRegisterSize = 1024;
+// Register class is part of the CSE profile for every instruction that
+// references a register, so notify observers before changing it.
+static void setRegClassWithObserver(MachineIRBuilder &B,
----------------
arsenm wrote:
I really hate the observer pattern, it's very spammy. Can we instead just create new registers instead of trying to recycle?
https://github.com/llvm/llvm-project/pull/217258
More information about the llvm-commits
mailing list