pipeline.append(make_unique<CopyLoweringPass>());
// Lower ConcatF as Shuffle if it is not delegated to NNAPI yet
pipeline.append(make_unique<ConcatLoweringPass>());
+ pipeline.append(make_unique<BypassGenerationPass>());
// 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()));
- generate_bypass_shuffle(code(sess));
-
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)
#define __ENCO_OPTIMIZATIONS_H__
#include "Code.h"
+#include "Pass.h"
namespace enco
{
*/
void generate_bypass_shuffle(enco::Code *code);
+struct BypassGenerationPass final : public Pass
+{
+ PASS_CTOR(BypassGenerationPass)
+ {
+ // DO NOTHING
+ }
+
+ void run(const SessionID &sess) const override { generate_bypass_shuffle(code(sess)); }
+};
+
/**
* @brief Update the base bag of each object if possible
*