Add global value numbering pass.

This commit is contained in:
Camille GILLOT
2023-03-20 18:05:07 +00:00
parent 551c7183f8
commit 8b848af325
33 changed files with 6476 additions and 26 deletions

View File

@@ -76,6 +76,7 @@ mod errors;
mod ffi_unwind_calls;
mod function_item_references;
mod generator;
mod gvn;
pub mod inline;
mod instsimplify;
mod large_enums;
@@ -549,6 +550,7 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
// latter pass will leverage the created opportunities.
&separate_const_switch::SeparateConstSwitch,
&const_prop::ConstProp,
&gvn::GVN,
&dataflow_const_prop::DataflowConstProp,
//
// Const-prop runs unconditionally, but doesn't mutate the MIR at mir-opt-level=0.