Go to the documentation of this file.
58 const std::string& opName,
66 for (
int i = 0; i < op.
dagCount(); i++) {
81 bool discardDag =
false;
82 for (
int i = 0; i < currDag.
nodeCount(); i++) {
85 if (cNode ==
nullptr)
continue;
87 for (
auto& edge : currDag.
outEdges(*cNode)) {
91 "Operation DAG node is other than OperationNode.");
95 edge->dstOperand())) {
107 if (discardDag)
break;
113 retDags.push_back(&currDag);
133 int strangeOpCount = 0;
135 for (
int i = 0; i < dag.
nodeCount(); i++) {
142 if (opSet.find(refOp.
name()) == opSet.end()) {
148 return strangeOpCount;
168 int lastUnknownOperations = INT_MAX;
171 for (
int i = 0; i < op.
dagCount(); i++) {
175 if (strangeCount <= lastUnknownOperations) {
177 if (strangeCount < lastUnknownOperations) {
178 lastUnknownOperations = strangeCount;
182 foundDags.push_back(&currDag);
188 if (selectedDag.
isNull()) {
Operation & operation(const char *name)
virtual Node & headNode(const Edge &edge) const
Node & node(const int index) const
size_t count(const ImmInfoKey &key) const
virtual TCEString dagError(int index) const
Operation & referencedOperation() const
static int countUnknownOperations(OperationDAG &dag, OperationSet &opSet)
virtual TCEString name() const
static std::string toString(const T &source)
#define assert(condition)
static OperationDAGList findDags(const std::string &opName, OperationSet opSet, const ImmInfo *immInfo=nullptr)
TCETools::CIStringSet OperationSet
OperationDAG & smallestNodeCount() const
virtual EdgeSet outEdges(const Node &node) const
virtual int dagCount() const
virtual OperationDAG & dag(int index) const
static OperationDAG * createExpandedDAG(const Operation &op, OperationSet &opSet)