// Lower ConcatF as Shuffle if it is not delegated to NNAPI yet
pipeline.append(make_unique<ConcatLoweringPass>());
pipeline.append(make_unique<BypassGenerationPass>());
+ pipeline.append(make_unique<FreeInstrEliminationPass>());
// Apply transforms in the pipeline
for (uint32_t n = 0; n < pipeline.size(); ++n)
// that share the same bag as their underlying bag
assert(!has_inout_bag(code(sess)->module()));
- eliminate_free_instr(code(sess));
// NOTE Free Op Elimination should be applied after Free Instr Elimination
// - Free Instr Elimination may generate additional free Op(s)
eliminate_free_op(code(sess));
#define __ENCO_TRANSFORM_FREE_INSTR_ELIMINATION_H__
#include "Code.h"
+#include "Pass.h"
namespace enco
{
eliminate_free_instr(code->module());
}
+struct FreeInstrEliminationPass final : public Pass
+{
+ PASS_CTOR(FreeInstrEliminationPass)
+ {
+ // DO NOTHING
+ }
+
+ void run(const SessionID &sess) const override { eliminate_free_instr(code(sess)); }
+};
+
} // namespace enco
#endif // __ENCO_TRANSFORM_FREE_INSTR_ELIMINATION_H__