Rewrite tblgen handling of subtarget features so
[oota-llvm.git] / utils / TableGen / InstrInfoEmitter.h
index 2dd3a0f44fc9fc885c5ba27f646ea2a1602219fd..977d3dbaf19d9d166a2ea60f20d9c82065e2511d 100644 (file)
@@ -29,7 +29,7 @@ class CodeGenInstruction;
 
 class InstrInfoEmitter : public TableGenBackend {
   RecordKeeper &Records;
-  CodeGenDAGPatterns CDP;
+  const CodeGenDAGPatterns CDP;
   std::map<std::string, unsigned> ItinClassMap;
   
 public:
@@ -41,6 +41,10 @@ public:
 private:
   typedef std::map<std::vector<std::string>, unsigned> OperandInfoMapTy;
   
+  // Instruction analysis.
+  void InferFromPattern(const CodeGenInstruction &Inst, 
+                        bool &MayStore, bool &MayLoad, bool &HasSideEffects);
+  
   void emitRecord(const CodeGenInstruction &Inst, unsigned Num,
                   Record *InstrInfo, 
                   std::map<std::vector<Record*>, unsigned> &EL,