about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorDylan MacKenzie <ecstaticmorse@gmail.com>2020-08-28 14:20:14 -0700
committerDylan MacKenzie <ecstaticmorse@gmail.com>2020-08-30 11:15:25 -0700
commitc03eba2d0833a21205b00e4b71e920df709a2658 (patch)
tree20836a30e17e13d725089e5ad052725e0bbf5dce /src/test/codegen/src-hash-algorithm
parentb19b8ea6113a6e912d508c11a25567b05d7db54c (diff)
downloadrust-c03eba2d0833a21205b00e4b71e920df709a2658.tar.gz
rust-c03eba2d0833a21205b00e4b71e920df709a2658.zip
Add `FIXME` for faster cached block transfer functions
I've tried a few ways of implementing this, but each fell short.

Adding an auxiliary `_Idx` associated type to `Analysis` that defaults
to `!` but is overridden in the blanket impl of `Analysis` for `A:
GenKillAnalysis` to `A::Idx` seems promising, but the trait solver is
unable to prove equivalence between `A::Idx` and `A::_Idx` within the
overridden version of `into_engine`. Without full-featured
specialization, removing `into_engine` or splitting it into a different
trait would have a significant ergonomic penalty.

Alternatively, we could erase the index type and store a
`GenKillSet<u32>` as well as a function pointer for transmuting between
`&mut A::Domain` and `&mut BitSet<u32>` in the hopes that LLVM can
devirtualize a simple function pointer better than the boxed closure.
However, this is brittle, requires `unsafe` code, and doesn't work for
index types that aren't the same size as a `u32` (e.g. `usize`) since
`GenKillSet` stores a `HybridBitSet`, which may be a `Vec<I>`. Perhaps
safe transmute could help here?
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions