[llvm] [InlineAsm] Steal a bit to denote a register is spillable (PR #70738)

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 14:46:10 PDT 2023


================
@@ -413,6 +418,26 @@ class InlineAsm final : public Value {
              "Flag is not a memory or function constraint!");
       Bitfield::set<MemConstraintCode>(Storage, ConstraintCode::Unknown);
     }
+
+    /// Set a bit to denote that while this operand is some kind of register
+    /// (use, def, ...), a memory flag did appear in the original constraint
+    /// list.  This is set by the instruction selection framework, and consumed
+    /// by the register allocator. While the register allocator is generally
+    /// responsible for spilling registers, we need to be able to distinguish
+    /// between registers that the register allocator has permission to spill
+    /// ("rm") vs ones it does not ("r"). This is because the inline asm may use
+    /// instructions which don't support memory addressing modes for that
+    /// operand.
----------------
nickdesaulniers wrote:

done in 245dfb60fcf5f766a62b37906c3cbf372423c6f8

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


More information about the llvm-commits mailing list