Skip to content

Remove MachineModulePass from LLVM #31

@Emoun

Description

@Emoun

A customization to LLVM that we have is llvm/CodeGen/MachineModulePass. The LLVM project has moved in a different direction, so we should get ready to do so too.

Back when we implemented MachineModulePass there was no way in LLVM to do so. Therefore, we added it to LLVM with the hope that some day LLVM would also provide it.
After looking into the history of this feature, I have concluded that the LLVM project decided on a different API for doing "machine module passes".
From what I can tell, they edited the codegen step of the backend to allow ModulePass to be used in it. This means MachineModulePasses can simply extend ModulePass.

As a result, I propose to move MachineModulePass into the Patmos folder for now. Then, as we port to LLVM 11, we switch to using the LLVM machine module pass infrastructure.

Note: I made a gist summarizing my finding with sources for anyone interested: here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions