[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86ISelLowering.h
Chris Lattner
sabre at nondot.org
Sat Mar 24 19:15:16 PDT 2007
Changes in directory llvm/lib/Target/X86:
X86ISelLowering.cpp updated: 1.376 -> 1.377
X86ISelLowering.h updated: 1.93 -> 1.94
---
Log message:
switch TargetLowering::getConstraintType to take the entire constraint,
not just the first letter. No functionality change.
---
Diffs of the changes: (+17 -13)
X86ISelLowering.cpp | 28 ++++++++++++++++------------
X86ISelLowering.h | 2 +-
2 files changed, 17 insertions(+), 13 deletions(-)
Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.376 llvm/lib/Target/X86/X86ISelLowering.cpp:1.377
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.376 Sat Mar 24 20:57:35 2007
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Sat Mar 24 21:14:49 2007
@@ -4521,19 +4521,23 @@
/// getConstraintType - Given a constraint letter, return the type of
/// constraint it is for this target.
X86TargetLowering::ConstraintType
-X86TargetLowering::getConstraintType(char ConstraintLetter) const {
- switch (ConstraintLetter) {
- case 'A':
- case 'r':
- case 'R':
- case 'l':
- case 'q':
- case 'Q':
- case 'x':
- case 'Y':
- return C_RegisterClass;
- default: return TargetLowering::getConstraintType(ConstraintLetter);
+X86TargetLowering::getConstraintType(const std::string &Constraint) const {
+ if (Constraint.size() == 1) {
+ switch (Constraint[0]) {
+ case 'A':
+ case 'r':
+ case 'R':
+ case 'l':
+ case 'q':
+ case 'Q':
+ case 'x':
+ case 'Y':
+ return C_RegisterClass;
+ default:
+ break;
+ }
}
+ return TargetLowering::getConstraintType(Constraint);
}
/// isOperandValidForConstraint - Return the specified operand (possibly
Index: llvm/lib/Target/X86/X86ISelLowering.h
diff -u llvm/lib/Target/X86/X86ISelLowering.h:1.93 llvm/lib/Target/X86/X86ISelLowering.h:1.94
--- llvm/lib/Target/X86/X86ISelLowering.h:1.93 Wed Mar 21 16:51:52 2007
+++ llvm/lib/Target/X86/X86ISelLowering.h Sat Mar 24 21:14:49 2007
@@ -316,7 +316,7 @@
SDOperand getReturnAddressFrameIndex(SelectionDAG &DAG);
- ConstraintType getConstraintType(char ConstraintLetter) const;
+ ConstraintType getConstraintType(const std::string &Constraint) const;
std::vector<unsigned>
getRegClassForInlineAsmConstraint(const std::string &Constraint,
More information about the llvm-commits
mailing list