[llvm-dev] [GlobalISel][RFC] Thoughts on MachineModulePass
Florian Brandner via llvm-dev
llvm-dev at lists.llvm.org
Mon Jan 25 01:31:33 PST 2016
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.
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.
I can walk you trough our code and give you feedback on things that we ran
into, if you like.
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.
best,
Florian
More information about the llvm-dev
mailing list