[llvm-dev] [GlobalISel][RFC] Thoughts on MachineModulePass

Quentin Colombet via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 25 13:47:17 PST 2016


Hi Florian,

> On Jan 25, 2016, at 1:31 AM, Florian Brandner <florian.brandner at telecom-paristech.fr> wrote:
> 
> Hi Quentin,
> 
>> On 22 Jan 2016, at 15:16, Quentin Colombet <qcolombet at apple.com> wrote:
>> 1. If anyone else is interested for such concept?
> 
> yes, we are! (https://github.com/t-crest)
> 
>> 2. What kind of information should we make accessible in an hypothetical MachineModule? I.e., how do you plan to use the MachineModulePass so that we make the right design decisions for the MachineModule feeding those passes? 
> 
> we are building a toolchain for real-time systems, including optimizations and
> analyses that deal with the machine-level code of entire real-time 
> applications.

Sounds interesting!

> 
> we have implemented MachineModulePasses based on LLVM 3.4 (see the patmos-llvm
> repository of T-CREST). it is clearly not a final solution for wide-spread 
> use, but it works with a few limitations. for instance, it is difficult to 
> preserve analysis information and access it in a machine module pass. similarly, 
> it is rather difficult to pass information from a machine module pass back to 
> function passes. we currently, work around this using ImmutablePasses.

Is there a chance you could port your changes for MachineModulePass for ToT?

> 
> I can walk you trough our code and give you feedback on things that we ran 
> into, if you like.

I see in your repository that you are still passing a Module to the module pass instead of a hypothetical MachineModule.
How do you access each machine function in the module then?
Do you have an example of MachineModulePass?

> 
> 
> ideally, the IR-level and the machine-level passes should (more or less) 
> behave the same. I would also plan ahead and allow modifications to modules
> (add/remove functions, global variables, ...). sooner or later people will want
> to do this, once machine module passes are available.

Agreed.

Cheers,
-Quentin

> 
> 
> best,
> Florian
> 
> 



More information about the llvm-dev mailing list