#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
#![warn(unused_import_braces)]
#![cfg_attr(feature = "std", deny(unstable_features))]
#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
#![cfg_attr(feature="cargo-clippy", allow(
clippy::while_let_loop,
clippy::needless_lifetimes,
clippy::many_single_char_names,
clippy::identity_op,
clippy::needless_borrow,
clippy::cast_lossless,
clippy::unreadable_literal,
clippy::assign_op_pattern,
clippy::empty_line_after_outer_attr,
clippy::cognitive_complexity,
clippy::too_many_arguments,
clippy::match_same_arms,
clippy::new_without_default,
clippy::should_implement_trait,
clippy::len_without_is_empty))]
#![cfg_attr(
feature = "cargo-clippy",
warn(
clippy::float_arithmetic,
clippy::mut_mut,
clippy::nonminimal_bool,
clippy::map_unwrap_or,
clippy::unicode_not_nfc,
clippy::use_self
)
)]
#![no_std]
#![cfg_attr(not(feature = "all-arch"), allow(dead_code))]
#[allow(unused_imports)] #[macro_use]
extern crate alloc;
#[cfg(feature = "std")]
#[macro_use]
extern crate std;
#[cfg(not(feature = "std"))]
use hashbrown::{hash_map, HashMap, HashSet};
#[cfg(feature = "std")]
use std::collections::{hash_map, HashMap, HashSet};
pub use crate::context::Context;
pub use crate::value_label::{ValueLabelsRanges, ValueLocRange};
pub use crate::verifier::verify_function;
pub use crate::write::write_function;
pub use cranelift_bforest as bforest;
pub use cranelift_entity as entity;
#[cfg(feature = "unwind")]
pub use gimli;
#[macro_use]
mod machinst;
pub mod binemit;
pub mod cfg_printer;
pub mod cursor;
pub mod data_value;
pub mod dbg;
pub mod dominator_tree;
pub mod flowgraph;
pub mod ir;
pub mod isa;
pub mod loop_analysis;
pub mod print_errors;
pub mod settings;
pub mod timing;
pub mod verifier;
pub mod write;
pub use crate::entity::packed_option;
pub use crate::machinst::buffer::{MachCallSite, MachReloc, MachSrcLoc, MachStackMap, MachTrap};
pub use crate::machinst::{
CompiledCode, Final, MachBuffer, MachBufferFinalized, MachInst, MachInstEmit, Reg,
TextSectionBuilder, Writable,
};
mod alias_analysis;
mod bitset;
mod constant_hash;
mod context;
mod ctxhash;
mod dce;
mod divconst_magic_numbers;
mod egraph;
mod fx;
mod inst_predicates;
mod isle_prelude;
mod iterators;
mod legalizer;
mod licm;
mod nan_canonicalization;
mod opts;
mod remove_constant_phis;
mod result;
mod scoped_hash_map;
mod simple_gvn;
mod simple_preopt;
mod unionfind;
mod unreachable_code;
mod value_label;
#[cfg(feature = "souper-harvest")]
mod souper_harvest;
pub use crate::result::{CodegenError, CodegenResult, CompileError};
#[cfg(feature = "incremental-cache")]
pub mod incremental_cache;
#[macro_export]
macro_rules! trace {
($($tt:tt)*) => {
if cfg!(feature = "trace-log") {
::log::trace!($($tt)*);
}
};
}
include!(concat!(env!("OUT_DIR"), "/version.rs"));