//#ifndef TDL_INCLUDE_IR_CODEGEN_TUNE_H //#define TDL_INCLUDE_IR_CODEGEN_TUNE_H //namespace tdl{ //namespace codegen{ //// Layout binding pass //class TLVMAddTunerParams: public FunctionPass { //private: // enum CType{ // Layout = 0, Shape = 1 // }; // // Params pool // SmallVector LParamsPool; // // Constraints // typedef std::pair CNodeType; // typedef DenseMap> CGraphType; // // Layout constraints // CGraphType LCGraph; // DenseSet LCNodes; // // Shape constraints // CGraphType SCGraph; // DenseSet SCNodes; // // Relational // std::map, std::function> ExtraParams; // DenseSet Constants; // void addConstraint(CNodeType X, CNodeType Y, CType CT); // void initCPhi(Instruction *I); // void initCGraph(Instruction *V); // void connectedComponents(CNodeType X, ArrayRef Vals, CType CT, DenseSet &Nodes, CGraphType &Graph); //public: // static char ID; // TLVMAddTunerParams(): FunctionPass(ID){ } // void getAnalysisUsage(AnalysisUsage & AU) const override; // bool runOnFunction(Function &F) override; //private: // std::map, Constant*> KnownParams; //}; //class TLVMAddTunerConstraints: public FunctionPass { //public: // static char ID; // TLVMAddTunerConstraints(): FunctionPass(ID){ } // void getAnalysisUsage(AnalysisUsage & AU) const override; // bool runOnFunction(Function &F) override; //}; //} //} //#endif