pipeline.append(make_unique<IntrinsicSelectionPass>());
// Insert data ordering if necessary
pipeline.append(make_unique<DataLayoutConversionPass>());
+ pipeline.append(make_unique<IndirectCopyEliminationPass>());
// 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_indirect_copy(code(sess));
reduce_identical_object(code(sess));
reduce_duplicated_object(code(sess));
#define __ENCO_TRANSFORM_INDIRECT_COPY_ELIMINATION_H__
#include "Code.h"
+#include "Pass.h"
namespace enco
{
*/
void eliminate_indirect_copy(enco::Code *code);
+struct IndirectCopyEliminationPass final : public enco::Pass
+{
+ PASS_CTOR(IndirectCopyEliminationPass)
+ {
+ // DO NOTHING
+ }
+
+ void run(const SessionID &sess) const override { eliminate_indirect_copy(code(sess)); }
+};
+
} // namespace enco
#endif // __ENCO_TRANSFORM_INDIRECT_COPY_ELIMINATION_H__