[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:45:07 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:
perhaps I should also reword this?
https://github.com/llvm/llvm-project/pull/70738
More information about the llvm-commits
mailing list