Greetings Segher and Peter,
After looking through the code and thinking about it seems that the best
way forward
is to rewrite most of the passes in GIMPLE or RTL to hook into a async
work queue
framework to launch it if the state is not shared. This will scale much
better than
the current version and be able to hook into newer passes if created
that require it.
I'm not as familiar with the RTL backends on a expert level so your
going to have to
answer some questions from me as I write out a very basic RFC for this
using C++11
async and memory models in terms of passing state. Writing this sort of
async code
unfortunately requires lots of experience with it as related to subtle
details.
The first questions are:
1. What current heuristics do we have as it seems none for figuring out
what state is shared
as it seems none? If I correct the first thing to do is discuss what
bits/bitmasks we want
for figuring out shared state or other ways.
2. MD files seem to be a major source of shared state or reading them.
Is it possible
to read from them async? Doesn't seem to be a problem but the current
docs don't
mention it nor does it seem easy to do.
3. There are two ways to write this for RTL either one class for all the
state or a core
class will each major part being a subclass like delayed branch
scheduling e.t.c.Not sure
which is better so thought I would ask.
I'm going to start reading the register code more actively first in
order to see what a
RFC would be there as its the most complex part according to Peter,
Nick