-
Notifications
You must be signed in to change notification settings - Fork 9
Description
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.