the following set of 3 patches provide the infrastructure for a fast vrp
pass.
The pass is currently not invoked anywhere, but I wanted to get the
infrastructure bits in place now... just in case we want to use it
somewhere.
It clearly bootstraps with no regressions since it isn't being invoked
:-) I have however bootstrapped it with calls to the new fast-vrp pass
immediately following the EVRP, and as an EVRP replacement . This is to
primarily ensure it isn't doing anything harmful. That is a test of
sorts :-).
I also ran it instead of EVRP, and it bootstraps, but does trigger a few
regressions, all related to relation processing, which it doesn't do.
Patch one provides a new API for GORI which simply provides a list of
all the ranges that it can generate on an outgoing edge. It utilizes the
sparse ssa-cache, and simply sets the outgoing range as determines by
the edge. Its very efficient, only walking up the chain once and not
generating any other utillity structures. This provides fats an easy
access to any info an edge may provide. There is a second API for
querying a specific name instead of asking for all the ranges. It
should be pretty solid as is simply invokes ranges-ops and other
components the same way the larger GORI engine does, it just puts them
together in a different way
Patch 2 is the new DOM ranger. It assumes it will be called in DOM
order, and evaluates the statements, and tracks any ranges on outgoing
edges. Queries for ranges walk the dom tree looking for a range until
it finds one on an edge or hits the definition block. There are
additional efficiencies that can be employed, and I'll eventually get
back to them.
Patch 3 is the FAST VRP pass and folder. Its pretty straightforward,
invokes the new DOM ranger, and enables you to add MAKE_PASS
(pass_fast_vrp) in passes. def.
Timewise, it is currently about twice as fast as EVRP. It does basic
range evaluation and fold PHIs, etc. It does *not* do relation
processing or any of the fancier things we do (like statement side
effects). A little additional work can reduce the memory footprint
further too. I have done no experiments as yet as to the cot of adding
relations, but it would be pretty straightforward as it is just reusing
all the same components the main ranger does
Andrew