[llvm] [CodeGen][Spill2Reg] Initial patch (PR #118832)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 2 08:29:16 PST 2025


================
@@ -294,6 +294,11 @@ class TargetInstrInfo : public MCInstrInfo {
     return isLoadFromStackSlot(MI, FrameIndex);
   }
 
+  virtual const MachineOperand *isLoadFromStackSlotMO(const MachineInstr &MI,
+                                                      int &FrameIndex) const {
+    llvm_unreachable("target did not implement");
----------------
vporpo wrote:

The reasoning is that if I was implementing this for a new target I would prefer getting a crash telling me that I  should override this function, rather than getting it to silently skip spill2reg because some functions are not overridden. Wdyt?

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


More information about the llvm-commits mailing list