summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenDAGPatterns.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-04-03 00:02:49 +0000
committerDan Gohman <gohman@apple.com>2008-04-03 00:02:49 +0000
commitee4fa1977dd3a495a8857eef924ee5961db765c6 (patch)
treeb915aca8885f38aa53adbffbbbf6d9750d19506c /utils/TableGen/CodeGenDAGPatterns.h
parent271515a46d265f9dea123797d20a2140f54d35d3 (diff)
downloadllvm-ee4fa1977dd3a495a8857eef924ee5961db765c6.tar.gz
llvm-ee4fa1977dd3a495a8857eef924ee5961db765c6.tar.bz2
llvm-ee4fa1977dd3a495a8857eef924ee5961db765c6.tar.xz
Move instruction flag inference out of InstrInfoEmitter and into
CodeGenDAGPatterns, where it can be used in other tablegen backends. This allows the inference to be done for DAGISelEmitter so that it gets accurate mayLoad/mayStore/isSimpleLoad flags. This brings MemOperand functionality back to where it was before 48329. However, it doesn't solve the problem of anonymous patterns which expand to code that does loads or stores. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r--utils/TableGen/CodeGenDAGPatterns.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h
index 6000e551ec..0d29eb5165 100644
--- a/utils/TableGen/CodeGenDAGPatterns.h
+++ b/utils/TableGen/CodeGenDAGPatterns.h
@@ -17,7 +17,6 @@
#include <set>
-#include "TableGenBackend.h"
#include "CodeGenTarget.h"
#include "CodeGenIntrinsics.h"
@@ -277,7 +276,7 @@ public: // Higher level manipulation routines.
/// canPatternMatch - If it is impossible for this pattern to match on this
/// target, fill in Reason and return false. Otherwise, return true.
- bool canPatternMatch(std::string &Reason, CodeGenDAGPatterns &CDP);
+ bool canPatternMatch(std::string &Reason, const CodeGenDAGPatterns &CDP);
};
@@ -467,6 +466,7 @@ public:
CodeGenDAGPatterns(RecordKeeper &R);
~CodeGenDAGPatterns();
+ CodeGenTarget &getTargetInfo() { return Target; }
const CodeGenTarget &getTargetInfo() const { return Target; }
Record *getSDNodeNamed(const std::string &Name) const;
@@ -556,6 +556,7 @@ private:
void ParseDefaultOperands();
void ParseInstructions();
void ParsePatterns();
+ void InferInstructionFlags();
void GenerateVariants();
void FindPatternInputsAndOutputs(TreePattern *I, TreePatternNode *Pat,