|
LLVM 24.0.0git
|
#include "llvm/IR/InlineAsm.h"
Public Member Functions | |
| Flag () | |
| Flag (uint32_t F) | |
| Flag (enum Kind K, unsigned NumOps) | |
| operator uint32_t () | |
| Kind | getKind () const |
| bool | isRegUseKind () const |
| bool | isRegDefKind () const |
| bool | isRegDefEarlyClobberKind () const |
| bool | isClobberKind () const |
| bool | isImmKind () const |
| bool | isMemKind () const |
| bool | isFuncKind () const |
| StringRef | getKindName () const |
| unsigned | getNumOperandRegisters () const |
| getNumOperandRegisters - Extract the number of registers field from the inline asm operand flag. | |
| void | setNumOperandRegisters (unsigned NumOps) |
| Set the number of operands that follow the flag. | |
| bool | isUseOperandTiedToDef (unsigned &Idx) const |
| isUseOperandTiedToDef - Return true if the flag of the inline asm operand indicates it is an use operand that's matched to a def operand. | |
| bool | hasRegClassConstraint (unsigned &RC) const |
| hasRegClassConstraint - Returns true if the flag contains a register class constraint. | |
| ConstraintCode | getMemoryConstraintID () const |
| void | setMatchingOp (unsigned OperandNo) |
| setMatchingOp - Augment an existing flag with information indicating that this input operand is tied to a previous output operand. | |
| void | setRegClass (unsigned RC) |
| setRegClass - Augment an existing flag with the required register class for the following register operands. | |
| void | setMemConstraint (ConstraintCode C) |
| setMemConstraint - Augment an existing flag with the constraint code for a memory constraint. | |
| void | clearMemConstraint () |
| clearMemConstraint - Similar to setMemConstraint(0), but without the assertion checking that the constraint has not been set previously. | |
| void | setRegMayBeFolded (bool B) |
| 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. | |
| bool | getRegMayBeFolded () const |
Static Public Member Functions | |
| static constexpr unsigned | getMaxNumOperandRegisters () |
| The largest number of operands that a flag can describe. | |
Definition at line 311 of file InlineAsm.h.
|
inline |
Definition at line 327 of file InlineAsm.h.
|
inlineexplicit |
Definition at line 328 of file InlineAsm.h.
References F.
Definition at line 329 of file InlineAsm.h.
References AbstractManglingParser< Derived, Alloc >::NumOps, llvm::Bitfield::set(), and setNumOperandRegisters().
|
inline |
clearMemConstraint - Similar to setMemConstraint(0), but without the assertion checking that the constraint has not been set previously.
Definition at line 439 of file InlineAsm.h.
References assert(), isFuncKind(), isMemKind(), llvm::Bitfield::set(), and llvm::InlineAsm::Unknown.
|
inline |
Definition at line 334 of file InlineAsm.h.
References llvm::Bitfield::get().
Referenced by getKindName(), isClobberKind(), isFuncKind(), isImmKind(), isMemKind(), isRegDefEarlyClobberKind(), isRegDefKind(), and isRegUseKind().
|
inline |
Definition at line 344 of file InlineAsm.h.
References llvm::InlineAsm::Clobber, llvm::InlineAsm::Func, getKind(), llvm::InlineAsm::Imm, llvm_unreachable, llvm::InlineAsm::Mem, llvm::InlineAsm::RegDef, llvm::InlineAsm::RegDefEarlyClobber, and llvm::InlineAsm::RegUse.
|
inlinestaticconstexpr |
The largest number of operands that a flag can describe.
Definition at line 371 of file InlineAsm.h.
References llvm::Bitfield::Element< unsigned, 3, 13 >::Bits, and llvm::maskTrailingOnes().
Referenced by setNumOperandRegisters().
|
inline |
Definition at line 405 of file InlineAsm.h.
References assert(), llvm::Bitfield::get(), isFuncKind(), and isMemKind().
Referenced by setMemConstraint().
|
inline |
getNumOperandRegisters - Extract the number of registers field from the inline asm operand flag.
Definition at line 366 of file InlineAsm.h.
References llvm::Bitfield::get().
|
inline |
Definition at line 463 of file InlineAsm.h.
References assert(), llvm::Bitfield::get(), isRegDefEarlyClobberKind(), isRegDefKind(), and isRegUseKind().
hasRegClassConstraint - Returns true if the flag contains a register class constraint.
Sets RC to the register class ID.
Definition at line 394 of file InlineAsm.h.
|
inline |
Definition at line 340 of file InlineAsm.h.
References llvm::InlineAsm::Clobber, and getKind().
|
inline |
Definition at line 343 of file InlineAsm.h.
References llvm::InlineAsm::Func, and getKind().
Referenced by clearMemConstraint(), getMemoryConstraintID(), and setRegClass().
|
inline |
Definition at line 341 of file InlineAsm.h.
References getKind(), and llvm::InlineAsm::Imm.
Referenced by setRegClass().
|
inline |
Definition at line 342 of file InlineAsm.h.
References getKind(), and llvm::InlineAsm::Mem.
Referenced by clearMemConstraint(), getMemoryConstraintID(), llvm::InlineAsmLowering::lowerInlineAsm(), and setRegClass().
|
inline |
Definition at line 337 of file InlineAsm.h.
References getKind(), and llvm::InlineAsm::RegDefEarlyClobber.
Referenced by getRegMayBeFolded(), llvm::InlineAsmLowering::lowerInlineAsm(), and setRegMayBeFolded().
|
inline |
Definition at line 336 of file InlineAsm.h.
References getKind(), and llvm::InlineAsm::RegDef.
Referenced by getRegMayBeFolded(), llvm::InlineAsmLowering::lowerInlineAsm(), and setRegMayBeFolded().
|
inline |
Definition at line 335 of file InlineAsm.h.
References getKind(), and llvm::InlineAsm::RegUse.
Referenced by getRegMayBeFolded(), and setRegMayBeFolded().
isUseOperandTiedToDef - Return true if the flag of the inline asm operand indicates it is an use operand that's matched to a def operand.
Definition at line 385 of file InlineAsm.h.
|
inline |
Definition at line 333 of file InlineAsm.h.
|
inline |
setMatchingOp - Augment an existing flag with information indicating that this input operand is tied to a previous output operand.
Definition at line 413 of file InlineAsm.h.
References assert(), and llvm::Bitfield::set().
Referenced by llvm::InlineAsmLowering::lowerInlineAsm().
|
inline |
setMemConstraint - Augment an existing flag with the constraint code for a memory constraint.
Definition at line 433 of file InlineAsm.h.
References assert(), C(), getMemoryConstraintID(), llvm::Bitfield::set(), and llvm::InlineAsm::Unknown.
Referenced by llvm::InlineAsmLowering::lowerInlineAsm(), and prepareDAGLevelOperands().
|
inline |
Set the number of operands that follow the flag.
(The MIR parser reads the count last, so it can't pass it to the constructor.)
Definition at line 377 of file InlineAsm.h.
References AbstractManglingParser< Derived, Alloc >::NumOps, assert(), getMaxNumOperandRegisters(), and llvm::Bitfield::set().
Referenced by Flag().
|
inline |
setRegClass - Augment an existing flag with the required register class for the following register operands.
A tied use operand cannot have a register class, use the register class from the def operand instead.
Definition at line 422 of file InlineAsm.h.
References assert(), isFuncKind(), isImmKind(), isMemKind(), and llvm::Bitfield::set().
|
inline |
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 fold ("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.
A tied use can't be foldable: it stores its matched operand number in the bits that otherwise hold RegMayBeFolded.
Definition at line 457 of file InlineAsm.h.
References assert(), B(), isRegDefEarlyClobberKind(), isRegDefKind(), isRegUseKind(), and llvm::Bitfield::set().