[clang-tools-extra] [llvm] [clang] [MachineLICM][AArch64] Hoist COPY instructions with other uses in the loop (PR #71403)

David Green via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 21 11:26:47 PST 2023


================
@@ -1262,6 +1262,18 @@ bool MachineLICMBase::IsProfitableToHoist(MachineInstr &MI,
     return false;
   }
 
+  // If we have a COPY with other uses in the loop, hoist to allow the users to
----------------
davemgreen wrote:

Hello. From what I've seen in our benchmarks this has been positive, but there is often some noise from hoisting/sinking. You are right that this could be more conservative, but in our case cross register bank copies will be relatively expensive and we would want to hoist them if we could. I'm not sure about the subreg extracts, but a lot of COPYs are removed prior to register allocation and it would be good if it knew where best to re-add them, if needed.

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


More information about the cfe-commits mailing list