#include "PermutationEliminationPass.h"
+#include "backend/Backend.h"
#include "util/logging.h"
namespace onert
namespace pass
{
-void PermutationEliminationPass::callback(const ir::OperationIndex &ind, ir::Operation &node)
+void PermutationEliminationPass::callback(const ir::OperationIndex &ind, ir::IOperation &node)
{
_op_ind = ind;
node.accept(*this);
auto &out_operand_obj = _graph.operands().at(out_operand);
assert(out_operand_obj.getDef() == _op_ind);
out_operand_obj.unsetDef();
- _graph.operations().iterate([&](const ir::OperationIndex &op_ind, ir::Operation &op) {
+ _graph.operations().iterate([&](const ir::OperationIndex &op_ind, ir::IOperation &op) {
if (!op.getOutputs().contains(in_operand))
return;
// Update Operation and Operand edges
_graph.operations().remove(_op_ind);
}
- _graph.operations().iterate([&](const ir::OperationIndex &op_ind, ir::Operation &op) {
+ _graph.operations().iterate([&](const ir::OperationIndex &op_ind, ir::IOperation &op) {
if (!op.getInputs().contains(in_operand))
return;
op.replaceInputs(in_operand, out_operand);
in_operand_obj.removeUse(_op_ind);
// Make operations(that use the output) use the input
- _graph.operations().iterate([&](const ir::OperationIndex &op_ind, ir::Operation &op) {
+ _graph.operations().iterate([&](const ir::OperationIndex &op_ind, ir::IOperation &op) {
if (!op.getInputs().contains(out_operand))
return;
op.replaceInputs(out_operand, in_operand);