* @brief Create an instance of OpSequence with given op and push it to objects
*
* @param[in] op_idx Operation index that is emplaced
- * @param[in] op Operation that is emplaced
* @param[in] layout OpSequence's layout
* @return OpSequenceIndex
*/
- OpSequenceIndex emplace(const OperationIndex &op_index, const Operation &op, Layout layout);
+ OpSequenceIndex emplace(const OperationIndex &op_index, Layout layout);
/**
* @brief Push an instance of OpSequence to objects
* @return OpSequenceIndex
*/
OpSequenceIndex emplace(std::unique_ptr<OpSequence> &&op_seq);
-
/**
* @brief Check if an operation does exist in any OpSequences
*
* @brief Dump OpSequences
*
* @param msg Message that will be displayed
+ * @param graph Graph that has information used for dump
*/
- void dump(const std::string &msg) const;
+ void dump(const std::string &msg, const Operations &operations) const;
/**
* @brief Remove an operation from OpSequence
*
void removeFromOpSequence(const OperationIndex &operation_index);
private:
+ void cacheSequenceIndex(const OpSequenceIndex &seq_index, const OperationIndex &op_index) const;
+ OpSequenceIndex *findSequenceIndex(const OperationIndex &operation_index) const;
+
OpSequenceIndex findOperation(const OperationIndex &operation_index) const;
+ mutable std::unordered_map<OperationIndex, OpSequenceIndex> _seq_indexes;
};
} // namespace ir