Skip to content

Commit d0790cd

Browse files
author
git apple-llvm automerger
committed
Merge commit 'e0a48c065b03' from llvm.org/main into next
2 parents 5394151 + e0a48c0 commit d0790cd

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

llvm/include/llvm/IR/InlineAsm.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,19 @@ class InlineAsm final : public Value {
277277
// on INLINEASM and INLINEASM_BR MachineInstr's.
278278
//
279279
// The encoding of Flag is currently:
280-
// Bits 2-0 - A Kind::* value indicating the kind of the operand. (KindField)
281-
// Bits 15-3 - The number of SDNode operands associated with
282-
// this inline assembly operand. (NumOperands)
283-
// Bit 31 - determines if this is a matched operand. (IsMatched)
280+
// Bits 2-0 - A Kind::* value indicating the kind of the operand.
281+
// (KindField)
282+
// Bits 15-3 - The number of SDNode operands associated with this inline
283+
// assembly operand. Once lowered to MIR, this represents the
284+
// number of MachineOperands necessary to refer to a
285+
// MachineOperandType::MO_FrameIndex. (NumOperands)
286+
// Bit 31 - Determines if this is a matched operand. (IsMatched)
284287
// If bit 31 is set:
285-
// Bits 30-16 - The operand number that this operand must match. (MatchedOperandNo)
288+
// Bits 30-16 - The operand number that this operand must match.
289+
// (MatchedOperandNo)
286290
// Else if bits 2-0 are Kind::Mem:
287-
// Bits 30-16 - A ConstraintCode:: value indicating the original constraint code. (MemConstraintCode)
291+
// Bits 30-16 - A ConstraintCode:: value indicating the original
292+
// constraint code. (MemConstraintCode)
288293
// Else:
289294
// Bits 30-16 - The register class ID to use for the operand. (RegClass)
290295
//

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5803,11 +5803,15 @@ TargetLowering::ConstraintWeight
58035803

58045804
/// If there are multiple different constraints that we could pick for this
58055805
/// operand (e.g. "imr") try to pick the 'best' one.
5806-
/// This is somewhat tricky: constraints fall into four classes:
5807-
/// Other -> immediates and magic values
5806+
/// This is somewhat tricky: constraints (TargetLowering::ConstraintType) fall
5807+
/// into seven classes:
58085808
/// Register -> one specific register
58095809
/// RegisterClass -> a group of regs
58105810
/// Memory -> memory
5811+
/// Address -> a symbolic memory reference
5812+
/// Immediate -> immediate values
5813+
/// Other -> magic values (such as "Flag Output Operands")
5814+
/// Unknown -> something we don't recognize yet and can't handle
58115815
/// Ideally, we would pick the most specific constraint possible: if we have
58125816
/// something that fits into a register, we would pick it. The problem here
58135817
/// is that if we have something that could either be in a register or in

0 commit comments

Comments
 (0)