diff options
author | Chris Lattner <sabre@nondot.org> | 2007-03-25 02:14:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-03-25 02:14:49 +0000 |
commit | d685514e2e70c1d117272dd02096113e21691070 (patch) | |
tree | 53e9bee81c8215e9de990df914d4e87259d7d576 /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | d8aad61d4db37c2edb0b0dc59e860a2678d757cf (diff) | |
download | bcm5719-llvm-d685514e2e70c1d117272dd02096113e21691070.tar.gz bcm5719-llvm-d685514e2e70c1d117272dd02096113e21691070.zip |
switch TargetLowering::getConstraintType to take the entire constraint,
not just the first letter. No functionality change.
llvm-svn: 35322
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 718d9833892..7436c1747ad 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -1828,28 +1828,32 @@ PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const { //===----------------------------------------------------------------------===// TargetLowering::ConstraintType -TargetLowering::getConstraintType(char ConstraintLetter) const { +TargetLowering::getConstraintType(const std::string &Constraint) const { // FIXME: lots more standard ones to handle. - switch (ConstraintLetter) { - default: return C_Unknown; - case 'r': return C_RegisterClass; - case 'm': // memory - case 'o': // offsetable - case 'V': // not offsetable - return C_Memory; - case 'i': // Simple Integer or Relocatable Constant - case 'n': // Simple Integer - case 's': // Relocatable Constant - case 'I': // Target registers. - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - return C_Other; + if (Constraint.size() == 1) { + switch (Constraint[0]) { + default: break; + case 'r': return C_RegisterClass; + case 'm': // memory + case 'o': // offsetable + case 'V': // not offsetable + return C_Memory; + case 'i': // Simple Integer or Relocatable Constant + case 'n': // Simple Integer + case 's': // Relocatable Constant + case 'I': // Target registers. + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + return C_Other; + } } + // TODO: Handle registers. + return C_Unknown; } /// isOperandValidForConstraint - Return the specified operand (possibly |