* LICM pass * Uses loop analysis to detect loop tree * For each loop (starting with the inner ones), create a pre-header and move there loop-invariant instructions * An instruction is loop invariant if it does not use as argument a value defined earlier in the loop * File tests to check LICM's correctness * Optimized pre-header creation If the loop already has a natural pre-header, we use it instead of creating a new one. The natural pre-header of a loop is the only predecessor of the header it doesn't dominate.
43 lines
760 B
Rust
43 lines
760 B
Rust
//! Cretonne code generation library.
|
|
|
|
#![deny(missing_docs)]
|
|
|
|
pub use context::Context;
|
|
pub use legalizer::legalize_function;
|
|
pub use verifier::verify_function;
|
|
pub use write::write_function;
|
|
|
|
/// Version number of the cretonne crate.
|
|
pub const VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
|
|
|
#[macro_use]
|
|
pub mod dbg;
|
|
|
|
pub mod binemit;
|
|
pub mod dominator_tree;
|
|
pub mod entity_list;
|
|
pub mod entity_map;
|
|
pub mod flowgraph;
|
|
pub mod ir;
|
|
pub mod isa;
|
|
pub mod loop_analysis;
|
|
pub mod regalloc;
|
|
pub mod result;
|
|
pub mod settings;
|
|
pub mod sparse_map;
|
|
pub mod verifier;
|
|
|
|
mod abi;
|
|
mod constant_hash;
|
|
mod context;
|
|
mod iterators;
|
|
mod legalizer;
|
|
mod licm;
|
|
mod packed_option;
|
|
mod partition_slice;
|
|
mod predicates;
|
|
mod ref_slice;
|
|
mod simple_gvn;
|
|
mod topo_order;
|
|
mod write;
|