summaryrefslogtreecommitdiff
path: root/utils/TableGen/InstrInfoEmitter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-10 05:40:54 +0000
committerChris Lattner <sabre@nondot.org>2008-01-10 05:40:54 +0000
commit214884ba03bb3ba791a14db51a61aaa694ddcff8 (patch)
tree44a07d6943dabacdc4c3a28eebf2e08885db6073 /utils/TableGen/InstrInfoEmitter.cpp
parentbc0b9f70ae072d695e0eb7ceb729b3306b0679fe (diff)
downloadllvm-214884ba03bb3ba791a14db51a61aaa694ddcff8.tar.gz
llvm-214884ba03bb3ba791a14db51a61aaa694ddcff8.tar.bz2
llvm-214884ba03bb3ba791a14db51a61aaa694ddcff8.tar.xz
if an instr lacks a pattern, assume it has side effects (unless never has s-e is true).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45823 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/InstrInfoEmitter.cpp')
-rw-r--r--utils/TableGen/InstrInfoEmitter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp
index 7f25f3c462..bcb8be6625 100644
--- a/utils/TableGen/InstrInfoEmitter.cpp
+++ b/utils/TableGen/InstrInfoEmitter.cpp
@@ -154,7 +154,10 @@ public:
void Analyze(Record *InstRecord) {
const TreePattern *Pattern = CDP.getInstruction(InstRecord).getPattern();
- if (Pattern == 0) return; // No pattern.
+ if (Pattern == 0) {
+ HasSideEffects = 1;
+ return; // No pattern.
+ }
// FIXME: Assume only the first tree is the pattern. The others are clobber
// nodes.