diff options
author | Chris Lattner <sabre@nondot.org> | 2006-03-24 21:48:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-03-24 21:48:51 +0000 |
commit | 550525e3cf3a6ae60ccc7c6a6d82f83ab3ee0b84 (patch) | |
tree | 4aa401eca3f4131bb672b16e8ed2d2f171bb5bcb /utils/TableGen/DAGISelEmitter.h | |
parent | 47622e37215429c20d8278ff57496d840811cc13 (diff) | |
download | external_llvm-550525e3cf3a6ae60ccc7c6a6d82f83ab3ee0b84.zip external_llvm-550525e3cf3a6ae60ccc7c6a6d82f83ab3ee0b84.tar.gz external_llvm-550525e3cf3a6ae60ccc7c6a6d82f83ab3ee0b84.tar.bz2 |
Parse intrinsics correctly and perform type propagation. This doesn't currently
emit the code to select intrinsics, but that is next :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelEmitter.h')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/TableGen/DAGISelEmitter.h b/utils/TableGen/DAGISelEmitter.h index 35606f7..10b997d 100644 --- a/utils/TableGen/DAGISelEmitter.h +++ b/utils/TableGen/DAGISelEmitter.h @@ -16,6 +16,7 @@ #include "TableGenBackend.h" #include "CodeGenTarget.h" +#include "CodeGenIntrinsics.h" #include <set> namespace llvm { @@ -412,6 +413,7 @@ class DAGISelEmitter : public TableGenBackend { private: RecordKeeper &Records; CodeGenTarget Target; + std::vector<CodeGenIntrinsic> Intrinsics; std::map<Record*, SDNodeInfo> SDNodes; std::map<Record*, std::pair<Record*, std::string> > SDNodeXForms; @@ -448,6 +450,13 @@ public: return ComplexPatterns.find(R)->second; } + const CodeGenIntrinsic &getIntrinsic(Record *R) const { + for (unsigned i = 0, e = Intrinsics.size(); i != e; ++i) + if (Intrinsics[i].TheDef == R) return Intrinsics[i]; + assert(0 && "Unknown intrinsic!"); + abort(); + } + TreePattern *getPatternFragment(Record *R) const { assert(PatternFragments.count(R) && "Invalid pattern fragment request!"); return PatternFragments.find(R)->second; |