1
Fork 0

Add initial version of value analysis and dataflow constant propagation

This commit is contained in:
Jannis Christopher Köhl 2022-08-25 16:43:46 +00:00
parent 9b735a7132
commit 4f9c30fb67
26 changed files with 1948 additions and 2 deletions

View file

@ -54,6 +54,7 @@ mod const_goto;
mod const_prop;
mod const_prop_lint;
mod coverage;
mod dataflow_const_prop;
mod dead_store_elimination;
mod deaggregator;
mod deduce_param_attrs;
@ -569,6 +570,7 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
//
// FIXME(#70073): This pass is responsible for both optimization as well as some lints.
&const_prop::ConstProp,
&dataflow_const_prop::DataflowConstProp,
//
// Const-prop runs unconditionally, but doesn't mutate the MIR at mir-opt-level=0.
&const_debuginfo::ConstDebugInfo,