[llvm] [TTI][RISCV] Unconditionally break critical edges to sink ADDI (PR #108889)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 15:19:23 PDT 2024


================
@@ -78,6 +78,10 @@ class RISCVInstrInfo : public RISCVGenInstrInfo {
 
   bool isReallyTriviallyReMaterializable(const MachineInstr &MI) const override;
 
+  bool shouldBreakCriticalEdgeToSink(MachineInstr &MI) const override {
+    return MI.getOpcode() == RISCV::ADDI;
----------------
preames wrote:

It could be.  I left it unconstrained thinking we should probably always be sinking the addi, but if you want, I can add the restriction and it should change any of the diffs.

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


More information about the llvm-commits mailing list