Commit graph

1310 commits

Author SHA1 Message Date
Rich Kadel
ddb054aee8 Fix -Z instrument-coverage on MSVC
Found that -C link-dead-code (which was enabled automatically
under -Z instrument-coverage) was causing the linking error that
resulted in segmentation faults in coverage instrumented binaries. Link
dead code is now disabled under MSVC, allowing `-Z instrument-coverage`
to be enabled under MSVC for the first time.

More details are included in Issue #76038.

(This PR was broken out from PR #75828)
2020-08-31 18:41:13 -07:00
Dylan MacKenzie
b015109ba9 Add documentation to the Analysis traits 2020-08-30 14:26:04 -07:00
Dylan MacKenzie
e178a87036 Expand documentation for the lattice module 2020-08-30 13:27:07 -07:00
Dylan MacKenzie
c03eba2d08 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?
2020-08-30 11:15:25 -07:00
Dylan MacKenzie
b19b8ea611 Update dataflow analyses to use new interface 2020-08-30 11:15:25 -07:00
Dylan MacKenzie
3233fb18a8 Extend dataflow framework to support arbitrary lattices 2020-08-30 11:15:24 -07:00
Dylan MacKenzie
9e45e90596 Allow access to the underlying Results from a ResultsCursor 2020-08-30 11:15:24 -07:00
Dylan MacKenzie
a88dc37c54 Add regex dependency to librustc_mir 2020-08-30 11:15:21 -07:00
David Wood
6ff471b1cf
ty: remove obsolete printer
This commit removes the obsolete printer and replaces all uses of it
with `FmtPrinter`. Of the replaced uses, all but one use was in `debug!`
logging, two cases were notable:

- `MonoItem::to_string` is used in `-Z print-mono-items` and therefore
  affects the output of all codegen-units tests.
- `DefPathBasedNames` was used in `librustc_codegen_llvm/type_of.rs`
  with `LLVMStructCreateNamed` and that'll now get different values, but
  this should result in no functional change.

Signed-off-by: David Wood <david@davidtw.co>
2020-08-30 18:59:07 +01:00
mark
9e5f7d5631 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00