about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-09-27 21:54:49 +0000
committerbors <bors@rust-lang.org>2020-09-27 21:54:49 +0000
commitc0b15cc6ed37e626b2b5b324bbb0fdbf6688650a (patch)
tree40d073b31ffb947789422da4d64c2b2db39e0d1f /compiler/rustc_codegen_llvm/src/llvm/mod.rs
parent7f7a1cbfd3b55daee191247770627afab09eece2 (diff)
parentc0cd1b0a26a2d1ebc82c23764f8017a30e145f58 (diff)
downloadrust-c0b15cc6ed37e626b2b5b324bbb0fdbf6688650a.tar.gz
rust-c0b15cc6ed37e626b2b5b324bbb0fdbf6688650a.zip
Auto merge of #77242 - ecstatic-morse:dataflow-switch-int, r=jonas-schievink
Replace `discriminant_switch_effect` with more general version

#68528 added a new edge-specific effect for `SwitchInt` terminators, `discriminant_switch_effect`, to the dataflow framework. While this accomplished the short-term goal of making drop elaboration more precise, it wasn't really useful in other contexts: It only supported `SwitchInt`s on the discriminant of an `enum` and did not allow effects to be applied along the "otherwise" branch. In const-propagation, for example, arbitrary edge-specific effects for the targets of a `SwitchInt` can be used to remember the value a `match` scrutinee must have in each arm.

This PR replaces `discriminant_switch_effect` with a more general `switch_int_edge_effects` method. The new method has a slightly different interface from the other edge-specific effect methods (e.g. `call_return_effect`). This divergence is explained in the new method's documentation, and reading the changes to the various dataflow impls as well as `direction.rs` should further clarify things. This PR should not change behavior.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/mod.rs')
0 files changed, 0 insertions, 0 deletions