about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2019-06-12 15:00:43 -0700
committerDylan MacKenzie <ecstaticmorse@gmail.com>2019-06-22 10:18:19 -0700
commitc054186ec70ae2393330886cb8dc506aab21750c (patch)
treed8fda0e521840123309f44f07dbd629e7a5d1622 /src/test/ui/thinlto
parentd4d5d67c1c20b9599c812ab4d926ab4fa9fe6935 (diff)
downloadrust-c054186ec70ae2393330886cb8dc506aab21750c.tar.gz
rust-c054186ec70ae2393330886cb8dc506aab21750c.zip
rustc_mir: don't pass `on_entry` when building transfer functions.
This commit makes `sets.on_entry` inaccessible in
`{before_,}{statement,terminator}_effect`. This field was meant to allow
implementors of `BitDenotation` to access the initial state for each
block (optionally with the effect of all previous statements applied via
`accumulates_intrablock_state`) while defining transfer functions.
However, the ability to set the initial value for the entry set of each
basic block (except for START_BLOCK) no longer exists. As a result, this
functionality is mostly useless, and when it *was* used it was used
erroneously (see #62007).

Since `on_entry` is now useless, we can also remove `BlockSets`, which
held the `gen`, `kill`, and `on_entry` bitvectors and replace it with a
`GenKill` struct. Variables of this type are called `trans` since they
represent a transfer function. `GenKill`s are stored contiguously in
`AllSets`, which reduces the number of bounds checks and may improve
cache performance: one is almost never accessed without the other.

Replacing `BlockSets` with `GenKill` allows us to define some new helper
functions which streamline dataflow iteration and the
dataflow-at-location APIs. Notably, `state_for_location` used a subtle
side-effect of the `kill`/`kill_all` setters to apply the transfer
function, and could be incorrect if a transfer function depended on
effects of previous statements in the block on `gen_set`.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions