summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetInstrInfo.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-04-09 17:16:43 +0000
committerBob Wilson <bob.wilson@apple.com>2009-04-09 17:16:43 +0000
commit51856173c8848b5aeed0b9e56fba2353a02842ab (patch)
tree7f9e07aef2f8ad77cd87179a5421db3f72509866 /llvm/lib/Target/TargetInstrInfo.cpp
parent38533d48ddac4dba0c237470c7bb60308a2bc8cf (diff)
downloadbcm5719-llvm-51856173c8848b5aeed0b9e56fba2353a02842ab.tar.gz
bcm5719-llvm-51856173c8848b5aeed0b9e56fba2353a02842ab.zip
Fix pr3954. The register scavenger asserts for inline assembly with
register destinations that are tied to source operands. The TargetInstrDescr::findTiedToSrcOperand method silently fails for inline assembly. The existing MachineInstr::isRegReDefinedByTwoAddr was very close to doing what is needed, so this revision makes a few changes to that method and also renames it to isRegTiedToUseOperand (for consistency with the very similar isRegTiedToDefOperand and because it handles both two-address instructions and inline assembly with tied registers). llvm-svn: 68714
Diffstat (limited to 'llvm/lib/Target/TargetInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/TargetInstrInfo.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/llvm/lib/Target/TargetInstrInfo.cpp b/llvm/lib/Target/TargetInstrInfo.cpp
index 10a5cdb6247..1bdeef40097 100644
--- a/llvm/lib/Target/TargetInstrInfo.cpp
+++ b/llvm/lib/Target/TargetInstrInfo.cpp
@@ -16,19 +16,6 @@
#include "llvm/DerivedTypes.h"
using namespace llvm;
-/// findTiedToSrcOperand - Returns the operand that is tied to the specified
-/// dest operand. Returns -1 if there isn't one.
-int TargetInstrDesc::findTiedToSrcOperand(unsigned OpNum) const {
- for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
- if (i == OpNum)
- continue;
- if (getOperandConstraint(i, TOI::TIED_TO) == (int)OpNum)
- return i;
- }
- return -1;
-}
-
-
TargetInstrInfo::TargetInstrInfo(const TargetInstrDesc* Desc,
unsigned numOpcodes)
: Descriptors(Desc), NumOpcodes(numOpcodes) {
OpenPOWER on IntegriCloud