[PATCH] D64179: [CodeGen] Define an interface for the new pass manager.
Fedor Sergeev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 30 06:43:36 PDT 2019
fedor.sergeev added a comment.
I believe in order to make progress here we first need to settle down on a very principal matter -
what kind of IRUnit MachineFunction is?
In particular:
- how MachineFunction is being produced
- when MachineFunction is invalidated
- how MachineFunctions are being iterated (any particular order required etc)
- what is the "container" relation of MachineFunction to other IRUnits
Currently we have an hierarchical structure of IRUnits, with Module "containing" Functions, Function "containing" Loops, CGSCC "containing" Functions and contained in the Module.
Container is a rather principal relation here, which in particular defines the way analysis proxies are organized (Inner and Outer ones).
Currently in your code Function contains (a single) MachineFunction.
And iteration through MachineFunctions happens "by Function" (through FunctionToMachinePassAdaptor).
I see nothing wrong with this solution, just as it is a very principal decision I would better see it mentioned somewhere in high-level comments.
And then it seems to be more akin to Loops, so I would recommend to take a look at what LoopPassManager and FunctionToLoopPassAdaptor are doing.
There are many details to dive in, but first lets work on doing the basics right:
MachineFunctionPassManager
FunctionToMachineFunctionPassAdaptor
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64179/new/
https://reviews.llvm.org/D64179
More information about the llvm-commits
mailing list