diff options
author | Chris Lattner <sabre@nondot.org> | 2006-02-22 00:56:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-02-22 00:56:39 +0000 |
commit | 1efa40f6a4b561cf8f80fe018684236010645cd0 (patch) | |
tree | c0952ccdc9f90c9ae390c5b03583d5bd7382c53c /include/llvm/Target | |
parent | 16d597a20d405d8cb13f89f15b8c1fed20428808 (diff) | |
download | external_llvm-1efa40f6a4b561cf8f80fe018684236010645cd0.zip external_llvm-1efa40f6a4b561cf8f80fe018684236010645cd0.tar.gz external_llvm-1efa40f6a4b561cf8f80fe018684236010645cd0.tar.bz2 |
split register class handling from explicit physreg handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 0e51930..4757a4a 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -481,6 +481,7 @@ public: // enum ConstraintType { + C_Register, // Constraint represents a single register. C_RegisterClass, // Constraint represents one or more registers. C_Other, // Something else. C_Unknown // Unsupported constraint. @@ -491,13 +492,22 @@ public: /// constraint it is for this target. virtual ConstraintType getConstraintType(char ConstraintLetter) const; - /// getRegForInlineAsmConstraint - Given a constraint letter or register - /// name (e.g. "r" or "edx"), return a list of registers that can be used to - /// satisfy the constraint. This should only be used for physregs and - /// C_RegisterClass constraints. + + /// getRegClassForInlineAsmConstraint - Given a constraint letter (e.g. "r"), + /// return a list of registers that can be used to satisfy the constraint. + /// This should only be used for C_RegisterClass constraints. virtual std::vector<unsigned> - getRegForInlineAsmConstraint(const std::string &Constraint, - MVT::ValueType VT) const; + getRegClassForInlineAsmConstraint(const std::string &Constraint, + MVT::ValueType VT) const; + + /// getRegForInlineAsmConstraint - Given a physical register constraint (e.g. + /// {edx}), return the register number and the register class for the + /// register. This should only be used for C_Register constraints. On error, + /// this returns a register number of 0. + virtual std::pair<unsigned, const TargetRegisterClass*> + getRegForInlineAsmConstraint(const std::string &Constraint, + MVT::ValueType VT) const; + /// isOperandValidForConstraint - Return true if the specified SDOperand is /// valid for the specified target constraint letter. |