aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-08-23 19:34:41 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-08-23 19:34:41 +0000
commit9dc03bba1457a1b495d8378ef09b8bb102494fa8 (patch)
tree1cdcabdc6364cf95c52c45b6cd2be23dc7a48906 /llvm/utils/TableGen/CodeGenTarget.cpp
parent6c0c2f264261718500caedc480d9f19e134f564d (diff)
downloadllvm-9dc03bba1457a1b495d8378ef09b8bb102494fa8.zip
llvm-9dc03bba1457a1b495d8378ef09b8bb102494fa8.tar.gz
llvm-9dc03bba1457a1b495d8378ef09b8bb102494fa8.tar.bz2
Add CodeGenTarget::guessInstructionProperties.
Currently, TableGen just guesses instruction properties when it can't infer them form patterns. This adds a guessInstructionProperties flag to the instruction set definition that will be used to disable guessing. The flag is intended as a migration aid. It will be removed again when no more targets need their properties guessed. llvm-svn: 162460
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenTarget.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp
index 1dd2efc..8854816 100644
--- a/llvm/utils/TableGen/CodeGenTarget.cpp
+++ b/llvm/utils/TableGen/CodeGenTarget.cpp
@@ -334,6 +334,15 @@ bool CodeGenTarget::isLittleEndianEncoding() const {
return getInstructionSet()->getValueAsBit("isLittleEndianEncoding");
}
+/// guessInstructionProperties - Return true if it's OK to guess instruction
+/// properties instead of raising an error.
+///
+/// This is configurable as a temporary migration aid. It will eventually be
+/// permanently false.
+bool CodeGenTarget::guessInstructionProperties() const {
+ return getInstructionSet()->getValueAsBit("guessInstructionProperties");
+}
+
//===----------------------------------------------------------------------===//
// ComplexPattern implementation
//