Rustfmt
This commit is contained in:
@@ -429,8 +429,8 @@ where
|
||||
mod tests {
|
||||
use super::super::NodeData;
|
||||
use super::*;
|
||||
use core::mem;
|
||||
use alloc::vec::Vec;
|
||||
use core::mem;
|
||||
|
||||
#[test]
|
||||
fn node_size() {
|
||||
|
||||
@@ -584,8 +584,8 @@ where
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use core::mem;
|
||||
use alloc::string::ToString;
|
||||
use core::mem;
|
||||
|
||||
// Forest impl for a set implementation.
|
||||
struct TF();
|
||||
|
||||
@@ -84,9 +84,9 @@ impl<F: Forest> NodePool<F> {
|
||||
F::Key: fmt::Display,
|
||||
{
|
||||
use crate::entity::EntitySet;
|
||||
use alloc::vec::Vec;
|
||||
use core::borrow::Borrow;
|
||||
use core::cmp::Ordering;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
// The root node can't be an inner node with just a single sub-tree. It should have been
|
||||
// pruned.
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
use super::{Comparator, Forest, Node, NodeData, NodePool, Path, SetValue, INNER_SIZE};
|
||||
use crate::packed_option::PackedOption;
|
||||
#[cfg(test)]
|
||||
use alloc::string::String;
|
||||
#[cfg(test)]
|
||||
use core::fmt;
|
||||
use core::marker::PhantomData;
|
||||
#[cfg(test)]
|
||||
use alloc::string::String;
|
||||
|
||||
/// Tag type defining forest types for a set.
|
||||
struct SetTypes<K>(PhantomData<K>);
|
||||
@@ -357,8 +357,8 @@ where
|
||||
mod tests {
|
||||
use super::super::NodeData;
|
||||
use super::*;
|
||||
use core::mem;
|
||||
use alloc::vec::Vec;
|
||||
use core::mem;
|
||||
|
||||
#[test]
|
||||
fn node_size() {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
//! `TargetIsa::legalize_signature()` method.
|
||||
|
||||
use crate::ir::{AbiParam, ArgumentExtension, ArgumentLoc, Type};
|
||||
use core::cmp::Ordering;
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp::Ordering;
|
||||
|
||||
/// Legalization action to perform on a single argument or return value when converting a
|
||||
/// signature.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! The `CFGPrinter` utility.
|
||||
|
||||
use core::fmt::{Display, Formatter, Result, Write};
|
||||
use alloc::vec::Vec;
|
||||
use core::fmt::{Display, Formatter, Result, Write};
|
||||
|
||||
use crate::entity::SecondaryMap;
|
||||
use crate::flowgraph::{BasicBlock, ControlFlowGraph};
|
||||
|
||||
@@ -33,8 +33,8 @@ use crate::timing;
|
||||
use crate::unreachable_code::eliminate_unreachable_code;
|
||||
use crate::value_label::{build_value_labels_ranges, ComparableSourceLoc, ValueLabelsRanges};
|
||||
use crate::verifier::{verify_context, verify_locations, VerifierErrors, VerifierResult};
|
||||
use log::debug;
|
||||
use alloc::vec::Vec;
|
||||
use log::debug;
|
||||
|
||||
/// Persistent data structures and compilation pipeline.
|
||||
pub struct Context {
|
||||
|
||||
@@ -6,10 +6,10 @@ use crate::ir::instructions::BranchInfo;
|
||||
use crate::ir::{Ebb, ExpandedProgramPoint, Function, Inst, Layout, ProgramOrder, Value};
|
||||
use crate::packed_option::PackedOption;
|
||||
use crate::timing;
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp;
|
||||
use core::cmp::Ordering;
|
||||
use core::mem;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// RPO numbers are not first assigned in a contiguous way but as multiples of STRIDE, to leave
|
||||
/// room for modifications of the dominator tree.
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
use crate::ir::Constant;
|
||||
use crate::HashMap;
|
||||
use cranelift_entity::EntityRef;
|
||||
use alloc::collections::BTreeMap;
|
||||
use alloc::vec::Vec;
|
||||
use cranelift_entity::EntityRef;
|
||||
|
||||
/// This type describes the actual constant data.
|
||||
pub type ConstantData = Vec<u8>;
|
||||
|
||||
@@ -14,12 +14,12 @@ use crate::isa::TargetIsa;
|
||||
use crate::packed_option::ReservedValue;
|
||||
use crate::write::write_operands;
|
||||
use crate::HashMap;
|
||||
use alloc::vec::Vec;
|
||||
use core::fmt;
|
||||
use core::iter;
|
||||
use core::mem;
|
||||
use core::ops::{Index, IndexMut};
|
||||
use core::u16;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A data flow graph defines all instructions and extended basic blocks in a function as well as
|
||||
/// the data flow dependencies between them. The DFG also tracks values which can be either
|
||||
|
||||
@@ -455,8 +455,8 @@ impl From<Table> for AnyEntity {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use core::u32;
|
||||
use alloc::string::ToString;
|
||||
use core::u32;
|
||||
|
||||
#[test]
|
||||
fn value_with_number() {
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
use crate::ir::{ArgumentLoc, ExternalName, SigRef, Type};
|
||||
use crate::isa::{CallConv, RegInfo, RegUnit};
|
||||
use alloc::vec::Vec;
|
||||
use core::fmt;
|
||||
use core::str::FromStr;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Function signature.
|
||||
///
|
||||
|
||||
@@ -120,8 +120,8 @@ impl FromStr for ExternalName {
|
||||
mod tests {
|
||||
use super::ExternalName;
|
||||
use crate::ir::LibCall;
|
||||
use core::u32;
|
||||
use alloc::string::ToString;
|
||||
use core::u32;
|
||||
|
||||
#[test]
|
||||
fn display_testcase() {
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
//! Each type here should have a corresponding definition in the
|
||||
//! `cranelift-codegen/meta/src/shared/immediates` crate in the meta language.
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use core::fmt::{self, Display, Formatter};
|
||||
use core::iter::FromIterator;
|
||||
use core::str::{from_utf8, FromStr};
|
||||
use core::{i32, u32};
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Convert a type into a vector of bytes; all implementors in this file must use little-endian
|
||||
/// orderings of bytes to match WebAssembly's little-endianness.
|
||||
@@ -936,11 +936,11 @@ impl IntoBytes for Ieee64 {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use alloc::string::ToString;
|
||||
use core::fmt::Display;
|
||||
use core::mem;
|
||||
use core::str::FromStr;
|
||||
use core::{f32, f64};
|
||||
use alloc::string::ToString;
|
||||
|
||||
#[test]
|
||||
fn format_imm64() {
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
//! A large part of this module is auto-generated from the instruction descriptions in the meta
|
||||
//! directory.
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use core::fmt::{self, Display, Formatter};
|
||||
use core::ops::{Deref, DerefMut};
|
||||
use core::str::FromStr;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
use crate::ir;
|
||||
use crate::ir::types;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
//! The actual table of destinations is stored in a `JumpTableData` struct defined in this module.
|
||||
|
||||
use crate::ir::entities::Ebb;
|
||||
use alloc::vec::Vec;
|
||||
use core::fmt::{self, Display, Formatter};
|
||||
use core::slice::{Iter, IterMut};
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Contents of a jump table.
|
||||
///
|
||||
|
||||
@@ -750,8 +750,8 @@ mod tests {
|
||||
use crate::cursor::{Cursor, CursorPosition};
|
||||
use crate::entity::EntityRef;
|
||||
use crate::ir::{Ebb, Inst, ProgramOrder, SourceLoc};
|
||||
use core::cmp::Ordering;
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp::Ordering;
|
||||
|
||||
struct LayoutCursor<'f> {
|
||||
/// Borrowed function layout. Public so it can be re-borrowed from this cursor.
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
use crate::entity::{Iter, IterMut, Keys, PrimaryMap};
|
||||
use crate::ir::{StackSlot, Type};
|
||||
use crate::packed_option::PackedOption;
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp;
|
||||
use core::fmt;
|
||||
use core::ops::{Index, IndexMut};
|
||||
use core::slice;
|
||||
use core::str::FromStr;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
#[cfg(feature = "enable-serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -15,8 +15,8 @@ use crate::isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encoding
|
||||
use crate::isa::Builder as IsaBuilder;
|
||||
use crate::isa::{EncInfo, RegClass, RegInfo, TargetIsa};
|
||||
use crate::regalloc;
|
||||
use core::fmt;
|
||||
use alloc::boxed::Box;
|
||||
use core::fmt;
|
||||
use target_lexicon::{Architecture, Triple};
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
||||
@@ -15,8 +15,8 @@ use crate::isa::enc_tables::{lookup_enclist, Encodings};
|
||||
use crate::isa::Builder as IsaBuilder;
|
||||
use crate::isa::{EncInfo, RegClass, RegInfo, TargetIsa};
|
||||
use crate::regalloc;
|
||||
use core::fmt;
|
||||
use alloc::boxed::Box;
|
||||
use core::fmt;
|
||||
use target_lexicon::Triple;
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
||||
@@ -63,9 +63,9 @@ use crate::result::CodegenResult;
|
||||
use crate::settings;
|
||||
use crate::settings::SetResult;
|
||||
use crate::timing;
|
||||
use alloc::boxed::Box;
|
||||
use core::fmt;
|
||||
use failure_derive::Fail;
|
||||
use alloc::boxed::Box;
|
||||
use target_lexicon::{triple, Architecture, PointerWidth, Triple};
|
||||
|
||||
#[cfg(feature = "riscv")]
|
||||
|
||||
@@ -15,8 +15,8 @@ use crate::isa::enc_tables::{self as shared_enc_tables, lookup_enclist, Encoding
|
||||
use crate::isa::Builder as IsaBuilder;
|
||||
use crate::isa::{EncInfo, RegClass, RegInfo, TargetIsa};
|
||||
use crate::regalloc;
|
||||
use core::fmt;
|
||||
use alloc::boxed::Box;
|
||||
use core::fmt;
|
||||
use target_lexicon::{PointerWidth, Triple};
|
||||
|
||||
#[allow(dead_code)]
|
||||
@@ -137,8 +137,8 @@ mod tests {
|
||||
use crate::ir::{Function, InstructionData, Opcode};
|
||||
use crate::isa;
|
||||
use crate::settings::{self, Configurable};
|
||||
use core::str::FromStr;
|
||||
use alloc::string::{String, ToString};
|
||||
use core::str::FromStr;
|
||||
use target_lexicon::triple;
|
||||
|
||||
fn encstr(isa: &dyn isa::TargetIsa, enc: Result<isa::Encoding, isa::Legalize>) -> String {
|
||||
|
||||
@@ -17,8 +17,8 @@ use crate::isa::{EncInfo, RegClass, RegInfo, TargetIsa};
|
||||
use crate::regalloc;
|
||||
use crate::result::CodegenResult;
|
||||
use crate::timing;
|
||||
use core::fmt;
|
||||
use alloc::boxed::Box;
|
||||
use core::fmt;
|
||||
use target_lexicon::{PointerWidth, Triple};
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
||||
@@ -27,8 +27,8 @@ use crate::ir::{
|
||||
};
|
||||
use crate::isa::TargetIsa;
|
||||
use crate::legalizer::split::{isplit, vsplit};
|
||||
use log::debug;
|
||||
use alloc::vec::Vec;
|
||||
use log::debug;
|
||||
|
||||
/// Legalize all the function signatures in `func`.
|
||||
///
|
||||
|
||||
@@ -67,9 +67,9 @@
|
||||
use crate::cursor::{Cursor, CursorPosition, FuncCursor};
|
||||
use crate::flowgraph::{BasicBlock, ControlFlowGraph};
|
||||
use crate::ir::{self, Ebb, Inst, InstBuilder, InstructionData, Opcode, Type, Value, ValueDef};
|
||||
use alloc::vec::Vec;
|
||||
use core::iter;
|
||||
use smallvec::SmallVec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Split `value` into two values using the `isplit` semantics. Do this by reusing existing values
|
||||
/// if possible.
|
||||
|
||||
@@ -8,11 +8,11 @@ use crate::isa::TargetIsa;
|
||||
use crate::result::CodegenError;
|
||||
use crate::verifier::{VerifierError, VerifierErrors};
|
||||
use crate::write::{decorate_function, FuncWriter, PlainWriter};
|
||||
use core::fmt;
|
||||
use core::fmt::Write;
|
||||
use alloc::boxed::Box;
|
||||
use alloc::string::{String, ToString};
|
||||
use alloc::vec::Vec;
|
||||
use core::fmt;
|
||||
use core::fmt::Write;
|
||||
|
||||
/// Pretty-print a verifier error.
|
||||
pub fn pretty_verifier_error<'a>(
|
||||
|
||||
@@ -12,9 +12,9 @@ use crate::ir::{
|
||||
};
|
||||
use crate::isa::{RegInfo, RegUnit, TargetIsa};
|
||||
use crate::regalloc::RegDiversions;
|
||||
use alloc::vec::Vec;
|
||||
use core::convert::TryInto;
|
||||
use cranelift_entity::{PrimaryMap, SecondaryMap};
|
||||
use alloc::vec::Vec;
|
||||
|
||||
// =============================================================================================
|
||||
// A description of the redundant-fill-removal algorithm
|
||||
|
||||
@@ -17,12 +17,12 @@ use crate::regalloc::affinity::Affinity;
|
||||
use crate::regalloc::liveness::Liveness;
|
||||
use crate::regalloc::virtregs::{VirtReg, VirtRegs};
|
||||
use crate::timing;
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp;
|
||||
use core::fmt;
|
||||
use core::iter;
|
||||
use core::slice;
|
||||
use log::debug;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
// # Implementation
|
||||
//
|
||||
|
||||
@@ -183,9 +183,9 @@ use crate::isa::{EncInfo, OperandConstraint, TargetIsa};
|
||||
use crate::regalloc::affinity::Affinity;
|
||||
use crate::regalloc::liverange::LiveRange;
|
||||
use crate::timing;
|
||||
use alloc::vec::Vec;
|
||||
use core::mem;
|
||||
use core::ops::Index;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A set of live ranges, indexed by value number.
|
||||
type LiveRangeSet = SparseMap<Value, LiveRange>;
|
||||
|
||||
@@ -476,8 +476,8 @@ mod tests {
|
||||
use crate::entity::EntityRef;
|
||||
use crate::ir::{Ebb, Inst, Value};
|
||||
use crate::ir::{ExpandedProgramPoint, ProgramOrder};
|
||||
use core::cmp::Ordering;
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp::Ordering;
|
||||
|
||||
// Dummy program order which simply compares indexes.
|
||||
// It is assumed that EBBs have indexes that are multiples of 10, and instructions have indexes
|
||||
|
||||
@@ -275,9 +275,9 @@ mod tests {
|
||||
use super::Pressure;
|
||||
use crate::isa::{RegClass, TargetIsa};
|
||||
use crate::regalloc::RegisterSet;
|
||||
use alloc::boxed::Box;
|
||||
use core::borrow::Borrow;
|
||||
use core::str::FromStr;
|
||||
use alloc::boxed::Box;
|
||||
use target_lexicon::triple;
|
||||
|
||||
// Make an arm32 `TargetIsa`, if possible.
|
||||
|
||||
@@ -21,8 +21,8 @@ use crate::regalloc::live_value_tracker::{LiveValue, LiveValueTracker};
|
||||
use crate::regalloc::liveness::Liveness;
|
||||
use crate::timing;
|
||||
use crate::topo_order::TopoOrder;
|
||||
use log::debug;
|
||||
use alloc::vec::Vec;
|
||||
use log::debug;
|
||||
|
||||
/// Reusable data structures for the reload pass.
|
||||
pub struct Reload {
|
||||
|
||||
@@ -104,12 +104,12 @@ use crate::entity::{SparseMap, SparseMapValue};
|
||||
use crate::ir::Value;
|
||||
use crate::isa::{RegClass, RegUnit};
|
||||
use crate::regalloc::register_set::RegSetIter;
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp;
|
||||
use core::fmt;
|
||||
use core::mem;
|
||||
use core::u16;
|
||||
use log::debug;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A variable in the constraint problem.
|
||||
///
|
||||
@@ -1159,8 +1159,8 @@ mod tests {
|
||||
use crate::ir::Value;
|
||||
use crate::isa::{RegClass, RegInfo, RegUnit, TargetIsa};
|
||||
use crate::regalloc::RegisterSet;
|
||||
use core::str::FromStr;
|
||||
use alloc::boxed::Box;
|
||||
use core::str::FromStr;
|
||||
use target_lexicon::triple;
|
||||
|
||||
// Make an arm32 `TargetIsa`, if possible.
|
||||
|
||||
@@ -27,9 +27,9 @@ use crate::regalloc::pressure::Pressure;
|
||||
use crate::regalloc::virtregs::VirtRegs;
|
||||
use crate::timing;
|
||||
use crate::topo_order::TopoOrder;
|
||||
use alloc::vec::Vec;
|
||||
use core::fmt;
|
||||
use log::debug;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Return a top-level register class which contains `unit`.
|
||||
fn toprc_containing_regunit(unit: RegUnit, reginfo: &RegInfo) -> RegClass {
|
||||
|
||||
@@ -18,11 +18,11 @@ use crate::entity::{EntityList, ListPool};
|
||||
use crate::entity::{Keys, PrimaryMap, SecondaryMap};
|
||||
use crate::ir::{Function, Value};
|
||||
use crate::packed_option::PackedOption;
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp::Ordering;
|
||||
use core::fmt;
|
||||
use core::slice;
|
||||
use smallvec::SmallVec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A virtual register reference.
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
|
||||
use crate::constant_hash::{probe, simple_hash};
|
||||
use crate::isa::TargetIsa;
|
||||
use alloc::boxed::Box;
|
||||
use alloc::string::{String, ToString};
|
||||
use core::fmt;
|
||||
use core::str;
|
||||
use failure_derive::Fail;
|
||||
use alloc::boxed::Box;
|
||||
use alloc::string::{String, ToString};
|
||||
|
||||
/// A string-based configurator for settings groups.
|
||||
///
|
||||
|
||||
@@ -5,9 +5,9 @@ use crate::dominator_tree::DominatorTree;
|
||||
use crate::ir::{Function, Inst, InstructionData, Opcode, Type};
|
||||
use crate::scoped_hash_map::ScopedHashMap;
|
||||
use crate::timing;
|
||||
use alloc::vec::Vec;
|
||||
use core::cell::{Ref, RefCell};
|
||||
use core::hash::{Hash, Hasher};
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Test whether the given opcode is unsafe to even consider for GVN.
|
||||
fn trivially_unsafe_for_gvn(opcode: Opcode) -> bool {
|
||||
|
||||
@@ -2,12 +2,12 @@ use crate::ir::{Function, SourceLoc, Value, ValueLabel, ValueLabelAssignments, V
|
||||
use crate::isa::TargetIsa;
|
||||
use crate::regalloc::{Context, RegDiversions};
|
||||
use crate::HashMap;
|
||||
use alloc::collections::BTreeMap;
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp::Ordering;
|
||||
use core::iter::Iterator;
|
||||
use core::ops::Bound::*;
|
||||
use core::ops::Deref;
|
||||
use alloc::collections::BTreeMap;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
#[cfg(feature = "enable-serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -72,12 +72,12 @@ use crate::isa::TargetIsa;
|
||||
use crate::iterators::IteratorExtras;
|
||||
use crate::settings::FlagsOrIsa;
|
||||
use crate::timing;
|
||||
use core::cmp::Ordering;
|
||||
use core::fmt::{self, Display, Formatter, Write};
|
||||
use failure_derive::Fail;
|
||||
use alloc::collections::BTreeSet;
|
||||
use alloc::string::String;
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp::Ordering;
|
||||
use core::fmt::{self, Display, Formatter, Write};
|
||||
use failure_derive::Fail;
|
||||
|
||||
pub use self::cssa::verify_cssa;
|
||||
pub use self::liveness::verify_liveness;
|
||||
|
||||
@@ -14,9 +14,9 @@ use crate::isa::{RegInfo, TargetIsa};
|
||||
use crate::packed_option::ReservedValue;
|
||||
use crate::value_label::ValueLabelsRanges;
|
||||
use crate::HashSet;
|
||||
use core::fmt::{self, Write};
|
||||
use alloc::string::String;
|
||||
use alloc::vec::Vec;
|
||||
use core::fmt::{self, Write};
|
||||
|
||||
/// A `FuncWriter` used to decorate functions during printing.
|
||||
pub trait FuncWriter {
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
use crate::iter::{Iter, IterMut};
|
||||
use crate::keys::Keys;
|
||||
use crate::EntityRef;
|
||||
use alloc::boxed::Box;
|
||||
use core::marker::PhantomData;
|
||||
use core::ops::{Index, IndexMut};
|
||||
use core::slice;
|
||||
use alloc::boxed::Box;
|
||||
|
||||
/// A slice mapping `K -> V` allocating dense entity references.
|
||||
///
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//! Small lists of entity references.
|
||||
use crate::packed_option::ReservedValue;
|
||||
use crate::EntityRef;
|
||||
use alloc::vec::Vec;
|
||||
use core::marker::PhantomData;
|
||||
use core::mem;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A small list of entity references allocated from a pool.
|
||||
///
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
use crate::iter::{Iter, IterMut};
|
||||
use crate::keys::Keys;
|
||||
use crate::EntityRef;
|
||||
use alloc::vec::Vec;
|
||||
use core::cmp::min;
|
||||
use core::marker::PhantomData;
|
||||
use core::ops::{Index, IndexMut};
|
||||
@@ -13,7 +14,6 @@ use serde::{
|
||||
ser::{SerializeSeq, Serializer},
|
||||
Deserialize, Serialize,
|
||||
};
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A mapping `K -> V` for densely indexed entity references.
|
||||
///
|
||||
|
||||
@@ -3,14 +3,14 @@ use crate::boxed_slice::BoxedSlice;
|
||||
use crate::iter::{Iter, IterMut};
|
||||
use crate::keys::Keys;
|
||||
use crate::EntityRef;
|
||||
use alloc::boxed::Box;
|
||||
use alloc::vec::Vec;
|
||||
use core::iter::FromIterator;
|
||||
use core::marker::PhantomData;
|
||||
use core::ops::{Index, IndexMut};
|
||||
use core::slice;
|
||||
#[cfg(feature = "enable-serde")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
use alloc::boxed::Box;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// A primary mapping `K -> V` allocating dense entity references.
|
||||
///
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
use crate::keys::Keys;
|
||||
use crate::EntityRef;
|
||||
use core::marker::PhantomData;
|
||||
use alloc::vec::Vec;
|
||||
use core::marker::PhantomData;
|
||||
|
||||
/// A set of `K` for densely indexed entity references.
|
||||
///
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
use crate::map::SecondaryMap;
|
||||
use crate::EntityRef;
|
||||
use alloc::vec::Vec;
|
||||
use core::mem;
|
||||
use core::slice;
|
||||
use core::u32;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Trait for extracting keys from values stored in a `SparseMap`.
|
||||
///
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//! A frontend for building Cranelift IR from other languages.
|
||||
use crate::ssa::{Block, SSABuilder, SideEffects};
|
||||
use crate::variable::Variable;
|
||||
use alloc::vec::Vec;
|
||||
use cranelift_codegen::cursor::{Cursor, FuncCursor};
|
||||
use cranelift_codegen::entity::{EntitySet, SecondaryMap};
|
||||
use cranelift_codegen::ir;
|
||||
@@ -13,7 +14,6 @@ use cranelift_codegen::ir::{
|
||||
};
|
||||
use cranelift_codegen::isa::{TargetFrontendConfig, TargetIsa};
|
||||
use cranelift_codegen::packed_option::PackedOption;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Structure used for translating a series of functions into Cranelift IR.
|
||||
///
|
||||
@@ -893,13 +893,13 @@ mod tests {
|
||||
use super::greatest_divisible_power_of_two;
|
||||
use crate::frontend::{FunctionBuilder, FunctionBuilderContext};
|
||||
use crate::Variable;
|
||||
use alloc::string::ToString;
|
||||
use cranelift_codegen::entity::EntityRef;
|
||||
use cranelift_codegen::ir::types::*;
|
||||
use cranelift_codegen::ir::{AbiParam, ExternalName, Function, InstBuilder, Signature};
|
||||
use cranelift_codegen::isa::CallConv;
|
||||
use cranelift_codegen::settings;
|
||||
use cranelift_codegen::verifier::verify_function;
|
||||
use alloc::string::ToString;
|
||||
|
||||
fn sample_function(lazy_seal: bool) {
|
||||
let mut sig = Signature::new(CallConv::SystemV);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
//! Lecture Notes in Computer Science, vol 7791. Springer, Berlin, Heidelberg
|
||||
|
||||
use crate::Variable;
|
||||
use alloc::vec::Vec;
|
||||
use core::mem;
|
||||
use core::u32;
|
||||
use cranelift_codegen::cursor::{Cursor, FuncCursor};
|
||||
@@ -17,7 +18,6 @@ use cranelift_codegen::ir::{Ebb, Function, Inst, InstBuilder, InstructionData, T
|
||||
use cranelift_codegen::packed_option::PackedOption;
|
||||
use cranelift_codegen::packed_option::ReservedValue;
|
||||
use smallvec::SmallVec;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// Structure containing the data relevant the construction of SSA for a given function.
|
||||
///
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use super::HashMap;
|
||||
use crate::frontend::FunctionBuilder;
|
||||
use alloc::vec::Vec;
|
||||
use cranelift_codegen::ir::condcodes::IntCC;
|
||||
use cranelift_codegen::ir::*;
|
||||
use log::debug;
|
||||
use alloc::vec::Vec;
|
||||
|
||||
type EntryIndex = u64;
|
||||
|
||||
@@ -290,8 +290,8 @@ impl ContiguousCaseRange {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::frontend::FunctionBuilderContext;
|
||||
use cranelift_codegen::ir::Function;
|
||||
use alloc::string::ToString;
|
||||
use cranelift_codegen::ir::Function;
|
||||
|
||||
macro_rules! setup {
|
||||
($default:expr, [$($index:expr,)*]) => {{
|
||||
|
||||
Reference in New Issue
Block a user