This will hide SplitPass class and provide split_into_phases() like the other transformation pass
Signed-off-by: SaeHie Park <saehie.park@samsung.com>
eliminate_dead_bag(code(sess));
// Split instructions into a set of phases (each block serves as a phase)
- SplitPass split;
- split.runOnCode(code(sess));
+ split_into_phases(code(sess));
const std::string data_var = "data";
const std::string data_filename = _prefix + ".bin";
} // namespace
-namespace enco
+namespace
{
+class SplitPass
+{
+public:
+ void runOnCode(enco::Code *code) const;
+};
+
void SplitPass::runOnCode(enco::Code *code) const
{
auto ann_ctx = make_unique<ANNContext>();
_subnet_contexts[code->module()] = std::move(ann_ctx);
}
+} // namespace
+
+namespace enco
+{
+
+void split_into_phases(enco::Code *code)
+{
+ SplitPass split;
+ split.runOnCode(code);
+}
+
} // namespace enco
/**
* @brief Split instructions into a set of phases
*/
-class SplitPass
-{
-public:
- void runOnCode(enco::Code *code) const;
-};
+void split_into_phases(enco::Code *code);
} // namespace enco;