fn construct_pass_manager() -> Result<PassManager> {
    // Construct the pass manager and register all passes.
    let mut pm = PassManager::new();

    // Register passes.
    register_pass!(pm, WellFormed);
    register_pass!(pm, StaticTiming);
    register_pass!(pm, CompileControl);
    register_pass!(pm, GoInsertion);
    register_pass!(pm, ComponentInterface);
    register_pass!(pm, Inliner);
    register_pass!(pm, MergeAssign);
    register_pass!(pm, Externalize);
    register_pass!(pm, RemoveExternalMemories);
    register_pass!(pm, CollapseControl);
    register_pass!(pm, CompileEmpty);
    register_pass!(pm, Papercut);

    // Register aliases
    register_alias!(
        pm,
        "all",
        [
            WellFormed,
            Papercut,
            RemoveExternalMemories,
            CompileEmpty,
            CollapseControl,
            StaticTiming,
            CompileControl,
            GoInsertion,
            ComponentInterface,
            Inliner,
            MergeAssign,
        ]
    );

    register_alias!(
        pm,
        "no-inline",
        [
            RemoveExternalMemories,
            CompileEmpty,
            StaticTiming,
            CompileControl,
            GoInsertion,
            ComponentInterface,
        ]
    );

    register_alias!(
        pm,
        "external",
        [
            WellFormed,
            Papercut,
            CompileEmpty,
            CollapseControl,
            CompileControl,
            StaticTiming,
            CompileControl,
            GoInsertion,
            ComponentInterface,
            Inliner,
            MergeAssign,
            Externalize,
        ]
    );

    register_alias!(pm, "none", []);

    Ok(pm)
}
/// Construct the pass manager by registering all passes and aliases used
/// by the command line.
Construct the pass manager by registering all passes and aliases used
by the command line.
Construct the pass manager by registering all passes and aliases used by the command line .
fn construct_pass_manager() -> Result<PassManager> {
    // Construct the pass manager and register all passes.
    let mut pm = PassManager::new();
    // Register passes.
    register_pass!(pm, WellFormed);
    register_pass!(pm, StaticTiming);
    register_pass!(pm, CompileControl);
    register_pass!(pm, GoInsertion);
    register_pass!(pm, ComponentInterface);
    register_pass!(pm, Inliner);
    register_pass!(pm, MergeAssign);
    register_pass!(pm, Externalize);
    register_pass!(pm, RemoveExternalMemories);
    register_pass!(pm, CollapseControl);
    register_pass!(pm, CompileEmpty);
    register_pass!(pm, Papercut);
    // Register aliases
    register_alias!(
        pm,
        "all",
        [
            WellFormed,
            Papercut,
            RemoveExternalMemories,
            CompileEmpty,
            CollapseControl,
            StaticTiming,
            CompileControl,
            GoInsertion,
            ComponentInterface,
            Inliner,
            MergeAssign,
        ]
    );
    register_alias!(
        pm,
        "no-inline",
        [
            RemoveExternalMemories,
            CompileEmpty,
            StaticTiming,
            CompileControl,
            GoInsertion,
            ComponentInterface,
        ]
    );
    register_alias!(
        pm,
        "external",
        [
            WellFormed,
            Papercut,
            CompileEmpty,
            CollapseControl,
            CompileControl,
            StaticTiming,
            CompileControl,
            GoInsertion,
            ComponentInterface,
            Inliner,
            MergeAssign,
            Externalize,
        ]
    );
    register_alias!(pm, "none", []);
    Ok(pm)
}
fn construct_pass_manager ( ) -> Result < PassManager > { // Construct the pass manager and register all passes. let mut pm = PassManager :: new ( ) ; // Register passes. register_pass ! ( pm WellFormed ) ; register_pass ! ( pm StaticTiming ) ; register_pass ! ( pm CompileControl ) ; register_pass ! ( pm GoInsertion ) ; register_pass ! ( pm ComponentInterface ) ; register_pass ! ( pm Inliner ) ; register_pass ! ( pm MergeAssign ) ; register_pass ! ( pm Externalize ) ; register_pass ! ( pm RemoveExternalMemories ) ; register_pass ! ( pm CollapseControl ) ; register_pass ! ( pm CompileEmpty ) ; register_pass ! ( pm Papercut ) ; // Register aliases register_alias ! ( pm " " [ WellFormed Papercut RemoveExternalMemories CompileEmpty CollapseControl StaticTiming CompileControl GoInsertion ComponentInterface Inliner MergeAssign ] ) ; register_alias ! ( pm " " [ RemoveExternalMemories CompileEmpty StaticTiming CompileControl GoInsertion ComponentInterface ] ) ; register_alias ! ( pm " " [ WellFormed Papercut CompileEmpty CollapseControl CompileControl StaticTiming CompileControl GoInsertion ComponentInterface Inliner MergeAssign Externalize ] ) ; register_alias ! ( pm " " [ ] ) ; Ok ( pm ) }
Construct the pass manager by registering all passes and aliases used
by the command line.
Construct the pass manager by registering all passes and aliases used by the command line .