[llvm] [NewPM] Adds a port for AArch64SIMDInstrOpt (PR #188177)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 08:56:56 PDT 2026


================
@@ -65,20 +66,24 @@ STATISTIC(NumModifiedInstr,
 
 namespace {
 
-struct AArch64SIMDInstrOpt : public MachineFunctionPass {
-  static char ID;
-
+class AArch64SIMDInstrOptImpl {
+public:
   const AArch64InstrInfo *TII;
   MachineRegisterInfo *MRI;
   TargetSchedModel SchedModel;
 
   // The two maps below are used to cache decisions instead of recomputing:
+  //
   // This is used to cache instruction replacement decisions within function
   // units and across function units.
----------------
boomanaiden154 wrote:

This comment is no longer correct as we're now not caching across function units due to creating a new Impl class instance each time. This caching is presumably important to compile time. If we store an instance of the Impl class, we should be able to avoid this.

https://github.com/llvm/llvm-project/pull/188177


More information about the llvm-commits mailing list