Skip to content

[TableGen][Target] Add documentation to Constraints. #85951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion llvm/include/llvm/Target/Target.td
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,20 @@ class Instruction : InstructionEncoding {
// Scheduling information from TargetSchedule.td.
list<SchedReadWrite> SchedRW;

string Constraints = ""; // OperandConstraint, e.g. $src = $dst.
/// Support for operand constraints. There are currently two kinds:
/// "$src = $dst"
/// Ensures that the operands are allocated to the same register.
///
/// "@earlyclobber $rd"
/// Ensures that LLVM will not use the same register for any inputs (other
/// than an input tied to this output).
///
/// See also:
/// - MC/MCInstrDesc.h:OperandConstraint::{TIED_TO, EARLY_CLOBBER}.
/// - CodeGen/MachineOperand.h:MachineOperand::{TiedTo, IsEarlyClobber}.
/// - The LLVM IR specification: Section `Output constraints` in the
/// discussion of inline assembly constraint strings.
string Constraints = "";

/// DisableEncoding - List of operand names (e.g. "$op1,$op2") that should not
/// be encoded into the output machineinstr.
Expand Down