aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/CodeGenInstruction.h
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-10-11 18:25:51 +0000
committerJim Grosbach <grosbach@apple.com>2010-10-11 18:25:51 +0000
commit01855071e24e0e3e75306b82267d3ad0b13a0c15 (patch)
treec2b81646a2418a8740b3bd98825f1e4f2c759af8 /utils/TableGen/CodeGenInstruction.h
parent40ef4fe82aefc3333f2cdeffb6ad28d9dfaccb8c (diff)
downloadexternal_llvm-01855071e24e0e3e75306b82267d3ad0b13a0c15.zip
external_llvm-01855071e24e0e3e75306b82267d3ad0b13a0c15.tar.gz
external_llvm-01855071e24e0e3e75306b82267d3ad0b13a0c15.tar.bz2
When figuring out which operands match which encoding fields in an instruction,
try to match them by name first. If there is no by-name match, fall back to assuming they are in order (this was the previous behavior). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenInstruction.h')
-rw-r--r--utils/TableGen/CodeGenInstruction.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenInstruction.h b/utils/TableGen/CodeGenInstruction.h
index 254cfed..049e694 100644
--- a/utils/TableGen/CodeGenInstruction.h
+++ b/utils/TableGen/CodeGenInstruction.h
@@ -186,6 +186,11 @@ namespace llvm {
/// specified name, throw an exception.
unsigned getOperandNamed(const std::string &Name) const;
+ /// hasOperandNamed - Query whether the instruction has an operand of the
+ /// given name. If so, return true and set OpIdx to the index of the
+ /// operand. Otherwise, return false.
+ bool hasOperandNamed(const std::string &Name, unsigned &OpIdx) const;
+
/// HasOneImplicitDefWithKnownVT - If the instruction has at least one
/// implicit def and it has a known VT, return the VT, otherwise return
/// MVT::Other.