SSValgrind::SSValgrind()
        : PragmaCustomCompilerPhase("css")
    {
        register_directive("start");
        register_directive("finish");
        register_directive("barrier");
        register_directive("wait");

        on_directive_post["start"].connect(functor(&SSValgrind::pragma_start, *this));
        on_directive_post["finish"].connect(functor(&SSValgrind::pragma_finish, *this));
        on_directive_post["barrier"].connect(functor(&SSValgrind::pragma_barrier, *this));
        on_directive_post["wait"].connect(functor(&SSValgrind::pragma_wait, *this));
    }
			TransformDirectives() : PragmaCustomCompilerPhase("css")
			{
				register_directive("start");
				register_directive("finish");
				register_directive("barrier");
				register_directive("wait");
				register_directive("restart");
				// task and target have been registered in TaskAnalysis
				on_directive_post["start"].connect(functor(&TransformDirectives::process_start, *this));
				on_directive_post["finish"].connect(functor(&TransformDirectives::process_finish, *this));
				on_directive_post["barrier"].connect(functor(&TransformDirectives::process_barrier, *this));
				on_directive_post["wait"].connect(functor(&TransformDirectives::process_wait, *this));
				on_directive_post["restart"].connect(functor(&TransformDirectives::process_restart, *this));
				on_directive_post["task"].connect(functor(&TransformDirectives::process_task, *this));
				on_directive_post["target"].connect(functor(&TransformDirectives::process_target, *this));
			}
        Interface::Interface()
            : PragmaCustomCompilerPhase("nanos")
        {
            set_phase_name("Nanos Runtime Source-Compiler Versioning Interface");
            set_phase_description("This phase enables support for '#pragma nanos', the interface for versioning runtime and compiler for Nanos");

            register_directive("interface");
            on_directive_pre["interface"].connect(functor(&Interface::interface_preorder, *this));
            on_directive_post["interface"].connect(functor(&Interface::interface_postorder, *this));

            register_directive("instrument|declare");
            on_directive_pre["instrument|declare"].connect(functor(&Interface::instrument_declare_pre, *this));
            on_directive_post["instrument|declare"].connect(functor(&Interface::instrument_declare_post, *this));

            register_directive("instrument|emit");
            on_directive_pre["instrument|emit"].connect(functor(&Interface::instrument_emit_pre, *this));
            on_directive_post["instrument|emit"].connect(functor(&Interface::instrument_emit_post, *this));
        }