| Age | Commit message (Collapse) | Author | Lines |
|
I tested this with it enabled 100% of the time, and we were able to run
mir-opt tests successfully.
|
|
|
|
|
|
This involves changing various details about that system,
though the basic shape remains the same.
|
|
The new setup is as follows. There is a pipeline of MIR passes that each
run **per def-id** to optimize a particular function. You are intended
to request MIR at whatever stage you need it. At the moment, there is
only one stage you can request:
- `optimized_mir(def_id)`
This yields the final product. Internally, it pulls the MIR for the
given def-id through a series of steps. Right now, these are still using
an "interned ref-cell" but they are intended to "steal" from one
another:
- `mir_build` -- performs the initial construction for local MIR
- `mir_pass_set` -- performs a suite of optimizations and transformations
- `mir_pass` -- an individual optimization within a suite
So, to construct the optimized MIR, we invoke:
mir_pass_set((MIR_OPTIMIZED, def_id))
which will build up the final MIR.
|
|
Overall goal: reduce the amount of context a mir pass needs so that it
resembles a query.
- The hooks are no longer "threaded down" to the pass, but rather run
automatically from the top-level (we also thread down the current pass
number, so that the files are sorted better).
- The hook now receives a *single* callback, rather than a callback per-MIR.
- The traits are no longer lifetime parameters, which moved to the
methods -- given that we required
`for<'tcx>` objecs, there wasn't much point to that.
- Several passes now store a `String` instead of a `&'l str` (again, no
point).
|
|
|
|
Each MIR key is a DefId that has MIR associated with it
|
|
this improves typeck & trans performance by 1%. This looked hotter on
callgrind than it is on a CPU.
|
|
|
|
|
|
|
|
|
|
Fairly basic implementation of inlining for MIR. Uses conservative
heuristics for inlining.
|