[llvm-commits] [llvm-gcc-4.2] r43378 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Dale Johannesen
dalej at apple.com
Thu Oct 25 20:29:56 PDT 2007
Author: johannes
Date: Thu Oct 25 22:29:56 2007
New Revision: 43378
URL: http://llvm.org/viewvc/llvm-project?rev=43378&view=rev
Log:
(inline asm) don't canonicalize single-hard-reg
constraints; they're already canonical.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=43378&r1=43377&r2=43378&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Oct 25 22:29:56 2007
@@ -3526,6 +3526,7 @@
if (IsInOut)
++NumInOut, ++NumInputs;
+ std::string SimplifiedConstraint;
// If this output register is pinned to a machine register, use that machine
// register instead of the specified constraint.
if (TREE_CODE(Operand) == VAR_DECL && DECL_HARD_REGISTER(Operand)) {
@@ -3539,14 +3540,14 @@
memcpy(NewConstraint+2, reg_names[RegNum], RegNameLen);
NewConstraint[RegNameLen+2] = '}';
NewConstraint[RegNameLen+3] = 0;
- Constraint = NewConstraint;
+ SimplifiedConstraint = NewConstraint;
}
+ } else {
+ // If we can simplify the constraint into something else, do so now. This
+ // avoids LLVM having to know about all the (redundant) GCC constraints.
+ SimplifiedConstraint = CanonicalizeConstraint(Constraint+1);
}
- // If we can simplify the constraint into something else, do so now. This
- // avoids LLVM having to know about all the (redundant) GCC constraints.
- std::string SimplifiedConstraint = CanonicalizeConstraint(Constraint+1);
-
LValue Dest = EmitLV(Operand);
const Type *DestValTy =
cast<PointerType>(Dest.Ptr->getType())->getElementType();
More information about the llvm-commits
mailing list