diff options
author | Dan Gohman <gohman@apple.com> | 2008-04-03 00:02:49 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-04-03 00:02:49 +0000 |
commit | ee4fa1977dd3a495a8857eef924ee5961db765c6 (patch) | |
tree | b915aca8885f38aa53adbffbbbf6d9750d19506c /utils/TableGen/CodeGenDAGPatterns.h | |
parent | 271515a46d265f9dea123797d20a2140f54d35d3 (diff) |
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.h | 5 |
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, |