Skip to content

Commit 4e3c723

Browse files
committed
use latest codegen changes + fix FxHash problem
1 parent 339093c commit 4e3c723

108 files changed

Lines changed: 61 additions & 159 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ jobs:
550550
cargo check -p wasmtime --no-default-features --features runtime,component-model &&
551551
cargo check -p wasmtime --no-default-features --features runtime,gc,component-model,async,debug-builtins &&
552552
cargo check -p cranelift-control --no-default-features &&
553-
cargo check -p cranelift-assembler-x64 &&
553+
cargo check -p cranelift-assembler-x64 --lib &&
554554
cargo check -p pulley-interpreter --features encode,decode,disas,interp &&
555555
cargo check -p wasmtime-wasi-io --no-default-features
556556
# Use `cross` for illumos to have a C compiler/linker available.

cranelift/codegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ std = ["serde?/std", "rustc-hash/std", "cranelift-control/fuzz"]
7171
# deprecated (we (i) always use hashbrown, and (ii) don't support a
7272
# no_std build anymore). The feature remains for backward
7373
# compatibility as a no-op.
74-
core = ["cranelift-assembler-x64/core"]
74+
core = []
7575

7676
# Enable the `to_capstone` method on TargetIsa, for constructing a Capstone
7777
# context, and the `disassemble` method on `MachBufferFinalized`.

cranelift/codegen/src/alias_analysis.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
//! must be correct likely reduce the potential benefit, we don't yet
6262
//! do this.
6363
64+
use crate::{FxHashMap, FxHashSet};
6465
use crate::{
6566
cursor::{Cursor, FuncCursor},
6667
dominator_tree::DominatorTree,
@@ -71,7 +72,6 @@ use crate::{
7172
trace,
7273
};
7374
use cranelift_entity::{EntityRef, packed_option::PackedOption};
74-
use rustc_hash::{FxHashMap, FxHashSet};
7575

7676
/// For a given program point, the vector of last-store instruction
7777
/// indices for each disjoint category of abstract state.
@@ -400,4 +400,3 @@ fn get_ext_opcode(op: Opcode) -> Option<Opcode> {
400400
_ => Some(op),
401401
}
402402
}
403-
use crate::prelude::*;

cranelift/codegen/src/ctxhash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
//! node-internal data references some other storage (e.g., offsets into
55
//! an array or pool of shared data).
66
7-
use hashbrown::hash_table::HashTable;
87
use core::hash::{Hash, Hasher};
8+
use hashbrown::hash_table::HashTable;
99

1010
/// Trait that allows for equality comparison given some external
1111
/// context.

cranelift/codegen/src/data_value.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,4 +420,3 @@ mod test {
420420
);
421421
}
422422
}
423-
use crate::prelude::*;

cranelift/codegen/src/dominator_tree.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,4 +771,3 @@ mod tests {
771771
assert!(!dt.dominates(v3_def, block0, &cur.func.layout));
772772
}
773773
}
774-
use crate::prelude::*;

cranelift/codegen/src/egraph.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Support for egraphs represented in the DataFlowGraph.
22
3+
use crate::FxHashSet;
34
use crate::alias_analysis::{AliasAnalysis, LastStores};
45
use crate::ctxhash::{CtxEq, CtxHash, NullCtx};
56
use crate::cursor::{Cursor, CursorPosition, FuncCursor};
@@ -24,7 +25,6 @@ use core::hash::Hasher;
2425
use cranelift_control::ControlPlane;
2526
use cranelift_entity::SecondaryMap;
2627
use cranelift_entity::packed_option::ReservedValue;
27-
use rustc_hash::FxHashSet;
2828
use smallvec::SmallVec;
2929

3030
mod cost;
@@ -1110,4 +1110,3 @@ pub(crate) struct Stats {
11101110
pub(crate) elaborate_func_post_insts: u64,
11111111
pub(crate) eclass_size_limit: u64,
11121112
}
1113-
use crate::prelude::*;

cranelift/codegen/src/egraph/elaborate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ use crate::ir::{Block, Function, Inst, Value, ValueDef};
1111
use crate::loop_analysis::{Loop, LoopAnalysis};
1212
use crate::scoped_hash_map::ScopedHashMap;
1313
use crate::trace;
14+
use crate::{FxHashMap, FxHashSet};
1415
use alloc::vec::Vec;
1516
use cranelift_control::ControlPlane;
1617
use cranelift_entity::{EntitySet, SecondaryMap, packed_option::ReservedValue};
17-
use rustc_hash::{FxHashMap, FxHashSet};
1818
use smallvec::{SmallVec, smallvec};
1919

2020
pub(crate) struct Elaborator<'a> {
@@ -865,4 +865,3 @@ impl<'a> Elaborator<'a> {
865865
self.stats.elaborate_func_post_insts += self.func.dfg.num_insts() as u64;
866866
}
867867
}
868-
use crate::prelude::*;

cranelift/codegen/src/incremental_cache.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,3 @@ pub fn try_finish_recompile(func: &Function, bytes: &[u8]) -> Result<CompiledCod
239239
Err(err) => Err(RecompileError::Deserialize(err)),
240240
}
241241
}
242-
use crate::prelude::*;

cranelift/codegen/src/inline.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1584,4 +1584,3 @@ fn create_constants(allocs: &mut InliningAllocs, func: &mut ir::Function, callee
15841584
allocs.constants[*callee_constant] = Some(inlined_constant).into();
15851585
}
15861586
}
1587-
use crate::prelude::*;

0 commit comments

Comments
 (0)