commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
b9f51d7850e969d714936bc0d4a12c15e29e83ae
Dan Gohman
2018-02-24T06:27:52
Enable more compliler lints.
diff --git a/lib/cretonne/src/lib.rs b/lib/cretonne/src/lib.rs index f34bed638..ab7bb51f0 100644 --- a/lib/cretonne/src/lib.rs +++ b/lib/cretonne/src/lib.rs @@ -1,6 +1,8 @@ //! Cretonne code generation library. -#![deny(missing_docs)] +#![deny(missing_docs, + trivial_numeric_casts, + unused_extern_crat...
6
18
6
5a5f4e4a2f408a0f3c2f6c3783d4732fdd6be8be
Dan Gohman
2018-02-28T20:33:37
Switch to published packages rather than straight git paths. We can do this now that all our dependencies are available in published form, and this should reduce accidental breakage which APIs change.
diff --git a/Cargo.toml b/Cargo.toml index 66f4095f6..7a3a56bee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,11 +17,11 @@ name = "wasm2obj" path = "src/wasm2obj.rs" [dependencies] -cretonne = { git = "https://github.com/stoklund/cretonne.git" } -cretonne-frontend = { git = "https://github.com/stoklund/cretonne.g...
5
16
16
933d8487c10bef6aeafc5e30985c1d9a6f9c5e81
Dan Gohman
2018-02-28T20:26:49
Minor code simplification. NFC.
diff --git a/lib/obj/src/emit_module.rs b/lib/obj/src/emit_module.rs index 6e37f4f18..1ef3d9c27 100644 --- a/lib/obj/src/emit_module.rs +++ b/lib/obj/src/emit_module.rs @@ -1,4 +1,3 @@ -use cretonne::ir; use cretonne::settings; use cretonne::settings::Configurable; use faerie::Artifact; @@ -25,16 +24,7 @@ pub fn emi...
1
1
11
1cf9a8d669d453fd9e505db49c1cf7085b0d8f0a
Dan Gohman
2018-02-28T20:02:14
Implement the wasm sign-extension-ops proposal. https://github.com/WebAssembly/sign-extension-ops/
diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index abaaaef3b..21df608f7 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -634,12 +634,35 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let val = state.pop1(); st...
1
28
5
227baaadb8652eda9fa09fbfa73ee7d3d7ec32bd
Dan Gohman
2018-02-28T19:42:43
Enable the simple_gvn and licm passes at OptLevel::Best.
diff --git a/lib/cretonne/src/context.rs b/lib/cretonne/src/context.rs index 78b5d5beb..5b8db2414 100644 --- a/lib/cretonne/src/context.rs +++ b/lib/cretonne/src/context.rs @@ -18,7 +18,7 @@ use isa::TargetIsa; use legalize_function; use regalloc; use result::{CtonError, CtonResult}; -use settings::FlagsOrIsa; +use ...
1
1
3
e4b30d328467c3e30976a4a55710b79bd3229bb7
Nathan Froyd
2018-02-28T19:33:28
fix typo in build.rs
diff --git a/lib/cretonne/build.rs b/lib/cretonne/build.rs index 4d1b0edf7..d2ef3905b 100644 --- a/lib/cretonne/build.rs +++ b/lib/cretonne/build.rs @@ -46,7 +46,7 @@ fn main() { let cur_dir = env::current_dir().expect("Can't access current working directory"); let crate_dir = cur_dir.as_path(); - // Mak...
1
1
1
9010e576dd047edff867f29c71303c9b4893ec2d
Dan Gohman
2018-02-28T18:10:42
Simply instruction result value handling in the parser. Also, move the handling earlier so that they're checked before the rest of the instruction is checked.
diff --git a/lib/reader/src/parser.rs b/lib/reader/src/parser.rs index 43c149956..b4252d4cb 100644 --- a/lib/reader/src/parser.rs +++ b/lib/reader/src/parser.rs @@ -1632,6 +1632,11 @@ impl<'a> Parser<'a> { ctx: &mut Context, ebb: Ebb, ) -> Result<()> { + // Define the result values. + ...
1
5
16
60c6154b9438bcad93991c83ddc5a6e4ca92d2f5
Dan Gohman
2018-02-28T11:38:48
Add some crate keywords.
diff --git a/lib/cretonne/Cargo.toml b/lib/cretonne/Cargo.toml index e9bed118c..5dea4bb3f 100644 --- a/lib/cretonne/Cargo.toml +++ b/lib/cretonne/Cargo.toml @@ -7,6 +7,7 @@ license = "Apache-2.0" documentation = "https://cretonne.readthedocs.io/" repository = "https://github.com/Cretonne/cretonne" readme = "README.m...
2
2
0
af154655d7e45c7756a06b5920f405f27f1b96ee
Dan Gohman
2018-02-21T20:35:37
Replace `as` casts with type-conversion functions. https://github.com/rust-lang-nursery/rust-clippy/wiki#cast_lossless
diff --git a/lib/cretonne/src/isa/intel/abi.rs b/lib/cretonne/src/isa/intel/abi.rs index 21442250c..cf3005836 100644 --- a/lib/cretonne/src/isa/intel/abi.rs +++ b/lib/cretonne/src/isa/intel/abi.rs @@ -224,7 +224,7 @@ pub fn native_prologue_epilogue(func: &mut ir::Function, isa: &TargetIsa) -> res }); let to...
2
2
2
e943d932b90f4d3467a4f14fc064ff2324bbce45
Dan Gohman
2018-02-21T20:42:30
Change `match self` to `match *self` to avoid adding `&` to all patterns in a match. https://rust-lang-nursery.github.io/rust-clippy/v0.0.186/index.html#match_ref_pats
diff --git a/lib/cretonne/src/bforest/node.rs b/lib/cretonne/src/bforest/node.rs index 53a96f9b1..3c6b8c877 100644 --- a/lib/cretonne/src/bforest/node.rs +++ b/lib/cretonne/src/bforest/node.rs @@ -54,8 +54,8 @@ impl<F: Forest> Clone for NodeData<F> { impl<F: Forest> NodeData<F> { /// Is this a free/unused node? ...
1
30
30
234d097f656b468492ddc73573e9a18d8ae1839f
Dan Gohman
2018-02-21T20:43:36
Change `println!("")` to `println!()`. https://rust-lang-nursery.github.io/rust-clippy/v0.0.186/index.html#print_with_newline
diff --git a/cranelift/src/cat.rs b/cranelift/src/cat.rs index e8519b10d..36ae818e2 100644 --- a/cranelift/src/cat.rs +++ b/cranelift/src/cat.rs @@ -13,7 +13,7 @@ use filetest::subtest::{self, SubTest, Context, Result as STResult}; pub fn run(files: Vec<String>) -> CommandResult { for (i, f) in files.into_iter()....
2
4
4
81c126619b3386f1ba3364e1ede499300516e34f
Dan Gohman
2018-02-26T23:24:25
Ignore unknown custom wasm sections.
diff --git a/lib/wasm/src/module_translator.rs b/lib/wasm/src/module_translator.rs index d75f60a35..d50031fb0 100644 --- a/lib/wasm/src/module_translator.rs +++ b/lib/wasm/src/module_translator.rs @@ -124,6 +124,10 @@ pub fn translate_module<'data>( } } } + ...
1
4
0
023f8d798013db09c7df804f21ca0b644b4a5481
Lachlan Sneff
2018-01-19T02:42:58
Fixed missing vec
diff --git a/lib/cretonne/src/regalloc/virtregs.rs b/lib/cretonne/src/regalloc/virtregs.rs index 5116e8f02..df2dbca78 100644 --- a/lib/cretonne/src/regalloc/virtregs.rs +++ b/lib/cretonne/src/regalloc/virtregs.rs @@ -21,6 +21,7 @@ use packed_option::PackedOption; use ref_slice::ref_slice; use std::cmp::Ordering; use...
1
1
0
4cdbf2f56e134a52cd6be3fceff8d283547cbcdb
Lachlan Sneff
2018-01-16T00:11:52
Removed unused prelude
diff --git a/lib/cretonne/src/lib.rs b/lib/cretonne/src/lib.rs index 22914cc17..830209599 100644 --- a/lib/cretonne/src/lib.rs +++ b/lib/cretonne/src/lib.rs @@ -65,9 +65,6 @@ mod std { pub use core::*; #[macro_use] pub use alloc::{boxed, vec, string}; - pub mod prelude { - pub use core::prelude...
1
0
3
ddfa88c8ba909cf78d007c2d92b05ad59605a2e2
Lachlan Sneff
2018-01-16T00:00:40
Removed extraneous newlines
diff --git a/lib/cretonne/src/dominator_tree.rs b/lib/cretonne/src/dominator_tree.rs index a7625f840..661708583 100644 --- a/lib/cretonne/src/dominator_tree.rs +++ b/lib/cretonne/src/dominator_tree.rs @@ -8,7 +8,6 @@ use packed_option::PackedOption; use std::cmp; use std::mem; use timing; - use std::cmp::Ordering; ...
13
0
13
2462a065add5e516794cd225e1bbd45e69d1c1e5
Lachlan Sneff
2018-01-15T22:14:48
Fixed formatting issues
diff --git a/lib/cretonne/src/dbg.rs b/lib/cretonne/src/dbg.rs index 7e5cd2777..ace22b6c4 100644 --- a/lib/cretonne/src/dbg.rs +++ b/lib/cretonne/src/dbg.rs @@ -8,7 +8,6 @@ /// /// The output will appear in files named `cretonne.dbg.*`, where the suffix is named after the /// thread doing the logging. - #[cfg(not(f...
12
5
14
5c85c1ba4a1890fa0ec05b3355c85ffab8435fc9
Lachlan Sneff
2018-01-15T22:02:28
Fixed formatting issues
diff --git a/lib/cretonne/src/timing.rs b/lib/cretonne/src/timing.rs index 90d15353e..c05ee9300 100644 --- a/lib/cretonne/src/timing.rs +++ b/lib/cretonne/src/timing.rs @@ -91,7 +91,7 @@ impl fmt::Display for Pass { /// /// This whole module can be gated on a `cfg` feature to provide a dummy implementation for /// p...
1
2
2
66a150e67acded290bd7259ca7cc5113e428f5c0
Lachlan Sneff
2018-01-15T21:21:42
lib/wasm works with no_std
diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml index 2bad5f8d2..448166d56 100644 --- a/lib/wasm/Cargo.toml +++ b/lib/wasm/Cargo.toml @@ -15,5 +15,17 @@ wasmparser = "0.14.1" cretonne = { path = "../cretonne", version = "0.1.0" } cretonne-frontend = { path = "../frontend", version = "0.1.0" } +[dependencies....
8
58
0
299e8a9737259e6fd8052f3e520533f8fc3cd7f9
Lachlan Sneff
2018-01-15T21:21:26
lib/cretonne works with no_std
diff --git a/lib/cretonne/Cargo.toml b/lib/cretonne/Cargo.toml index 91dc6ccda..0cf3fffd9 100644 --- a/lib/cretonne/Cargo.toml +++ b/lib/cretonne/Cargo.toml @@ -20,8 +20,11 @@ name = "cretonne" [dependencies.hashmap_core] version = "0.1.1" optional = true +[dependencies.error_core] +version = "0.1.0" +optional = tru...
3
8
5
7375088c3ec10c9f12298a011d2eec69aed7a633
Lachlan Sneff
2018-01-15T19:05:38
Most of the way to no_std support
diff --git a/lib/cretonne/Cargo.toml b/lib/cretonne/Cargo.toml index 88ae712c0..91dc6ccda 100644 --- a/lib/cretonne/Cargo.toml +++ b/lib/cretonne/Cargo.toml @@ -17,3 +17,11 @@ name = "cretonne" # Please don't add any unless they are essential to the task of creating binary # machine code. Integration tests that need ...
42
146
5
f02c8fd1ff352364f33b9045aba116dbf5bf3e6e
Benjamin Bouvier
2018-02-23T16:21:44
Fixes #244: Prints the generated code size and wasm bytecode size in wasm command;
diff --git a/cranelift/src/cton-util.rs b/cranelift/src/cton-util.rs index fe121d005..9f6891489 100644 --- a/cranelift/src/cton-util.rs +++ b/cranelift/src/cton-util.rs @@ -32,7 +32,7 @@ Usage: cton-util filecheck [-v] <file> cton-util print-cfg <file>... cton-util compile [-vpT] [--set <set>]... [--isa ...
3
48
2
f276a021cbb889c369b9e062838be8a604065541
Dan Gohman
2018-02-22T17:44:02
Update wasmstandalone for API changes. This updates to the latest faerie and cretonne API changes.
diff --git a/Cargo.toml b/Cargo.toml index 61a5982e7..66f4095f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,9 +25,9 @@ cretonne-native = { git = "https://github.com/stoklund/cretonne.git" } wasmstandalone_runtime = { path = "lib/runtime" } wasmstandalone_execute = { path = "lib/execute" } wasmstandalone_obj = { ...
9
115
47
20500913adf7b80e3ea6df33b4506815c5ab86a4
Dan Gohman
2018-02-21T15:25:43
Change tabs to spaces, for consistency with rustfmt. This code is in a macro, which is presumably why rustfmt itself doesn't reformat it.
diff --git a/lib/cretonne/src/entity/mod.rs b/lib/cretonne/src/entity/mod.rs index 837bb5f10..3cc8ec6f6 100644 --- a/lib/cretonne/src/entity/mod.rs +++ b/lib/cretonne/src/entity/mod.rs @@ -90,8 +90,8 @@ macro_rules! entity_impl { impl ::std::fmt::Debug for $entity { fn fmt(&self, f: &mut ::std::...
1
3
3
043d80f7e1855f3694f8f4bff172373e087df30e
Jakob Stoklund Olesen
2018-02-21T20:14:50
Make the bitset module private. This is just an implementation detail.
diff --git a/lib/cretonne/src/lib.rs b/lib/cretonne/src/lib.rs index f947f6862..b4c386477 100644 --- a/lib/cretonne/src/lib.rs +++ b/lib/cretonne/src/lib.rs @@ -17,7 +17,6 @@ pub mod entity; pub mod bforest; pub mod binemit; -pub mod bitset; pub mod cursor; pub mod dominator_tree; pub mod flowgraph; @@ -31,6 +30...
1
1
1
eae8261b076c76df007e7b6ac8448ea4c4e2f1a5
Jakob Stoklund Olesen
2018-02-21T20:11:50
Make the regalloc module private. Cretonne clients don't need to know how the register allocator works. Export the RegDiversions type from the binemit module instead. It is used by the "test binemit" driver.
diff --git a/cranelift/src/filetest/binemit.rs b/cranelift/src/filetest/binemit.rs index 9b18a439a..550703f0b 100644 --- a/cranelift/src/filetest/binemit.rs +++ b/cranelift/src/filetest/binemit.rs @@ -10,7 +10,7 @@ use cretonne::binemit; use cretonne::dbg::DisplayList; use cretonne::ir; use cretonne::ir::entities::A...
3
3
3
69cc6c8af375ff8465b3038afeea682d315df6f5
Dan Gohman
2018-02-20T22:44:05
Clean up more comments referring to "source numbers".
diff --git a/lib/reader/src/parser.rs b/lib/reader/src/parser.rs index a0a17faa1..43c149956 100644 --- a/lib/reader/src/parser.rs +++ b/lib/reader/src/parser.rs @@ -1735,8 +1735,6 @@ impl<'a> Parser<'a> { // The controlling type variable can be specified explicitly as 'splat.i32x4 v5', or it can be // inferre...
2
8
10
c846ec1626120a73ba33fc85203649c58b4ca7ea
Jakob Stoklund Olesen
2018-02-20T22:44:57
Catch NaN explicitly in expand_fcvt_to_uint(). When the input is a NaN, we need to generate a different trap code, so use the new trapff instruction to generate such a trap after the first floating point comparison.
diff --git a/lib/cretonne/src/isa/intel/enc_tables.rs b/lib/cretonne/src/isa/intel/enc_tables.rs index 238088698..1a602cf8a 100644 --- a/lib/cretonne/src/isa/intel/enc_tables.rs +++ b/lib/cretonne/src/isa/intel/enc_tables.rs @@ -449,21 +449,43 @@ fn expand_fcvt_to_uint( ir::types::F64 => pos.ins().f64const(Iee...
1
30
8
1e56d4446560fef29ecb97a2f0a3348e05cbb63e
Jakob Stoklund Olesen
2018-02-20T21:16:36
Remember the positive numbers in expand_fcvt_to_sint. We can get an INT_MIN result when converting a positive number that is too large to fit in an integer too.
diff --git a/lib/cretonne/src/isa/intel/enc_tables.rs b/lib/cretonne/src/isa/intel/enc_tables.rs index 98de07db4..238088698 100644 --- a/lib/cretonne/src/isa/intel/enc_tables.rs +++ b/lib/cretonne/src/isa/intel/enc_tables.rs @@ -391,6 +391,15 @@ fn expand_fcvt_to_sint( let overflow = pos.ins().fcmp(overflow_cc, x,...
1
9
0
21215529fe4f9221d152e265f4410de93727f980
Dan Gohman
2018-02-20T20:15:23
Simplify the code in make_inst_results_reusing; NFC.
diff --git a/lib/cretonne/src/ir/dfg.rs b/lib/cretonne/src/ir/dfg.rs index 923579d45..1c3a0fce3 100644 --- a/lib/cretonne/src/ir/dfg.rs +++ b/lib/cretonne/src/ir/dfg.rs @@ -452,29 +452,15 @@ impl DataFlowGraph { I: Iterator<Item = Option<Value>>, { let mut reuse = reuse.fuse(); - let const...
1
18
19
42e1616b82f9e7f39aa6d08ad845c8985559a24a
Dan Gohman
2018-02-14T04:14:01
Update to wasmparser 0.14.1.
diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml index 2aa984d72..56d49d7cf 100644 --- a/lib/wasm/Cargo.toml +++ b/lib/wasm/Cargo.toml @@ -11,7 +11,7 @@ license = "Apache-2.0" name = "cton_wasm" [dependencies] -wasmparser = "0.13.0" +wasmparser = "0.14.1" cretonne = { path = "../cretonne" } cretonne-fronten...
4
85
2
e3714ddd10a8864a7557baff858f38b2f3042474
Jakob Stoklund Olesen
2018-02-02T01:10:21
Add a func.inst_offsets() iterator. This Function method can be used after the final code layout has been computed. It returns all the instructions in an EBB along with their encoded size and offset from the beginning of the function. This is useful for extracting additional metadata about trapping instructions and o...
diff --git a/cranelift/src/filetest/binemit.rs b/cranelift/src/filetest/binemit.rs index aca308021..9b18a439a 100644 --- a/cranelift/src/filetest/binemit.rs +++ b/cranelift/src/filetest/binemit.rs @@ -211,7 +211,8 @@ impl SubTest for TestBinEmit { "Inconsistent {} header offset", ebb ...
2
48
3
429027e2f2b69bd74395960bb64964edfc3fbb25
Jakob Stoklund Olesen
2018-02-01T00:17:53
Stack alignment is 16 bytes on x86_64. Make sure that the stack frame size is always a multiple of 16 as specified by the x86_64 ABI. Heads up @pchickey
diff --git a/lib/cretonne/src/isa/intel/abi.rs b/lib/cretonne/src/isa/intel/abi.rs index 965283d82..21442250c 100644 --- a/lib/cretonne/src/isa/intel/abi.rs +++ b/lib/cretonne/src/isa/intel/abi.rs @@ -180,20 +180,28 @@ pub fn spiderwasm_prologue_epilogue( func: &mut ir::Function, isa: &TargetIsa, ) -> result...
1
12
4
099b959d57f5b55d623bc489745b9e64370b6354
Pat Hickey
2018-01-29T21:38:26
TargetIsa implies a Display of shared and isa-specific flags
diff --git a/lib/cretonne/src/isa/arm32/mod.rs b/lib/cretonne/src/isa/arm32/mod.rs index 49987f1e1..c3f295d4f 100644 --- a/lib/cretonne/src/isa/arm32/mod.rs +++ b/lib/cretonne/src/isa/arm32/mod.rs @@ -13,6 +13,7 @@ use isa::Builder as IsaBuilder; use isa::{TargetIsa, RegInfo, RegClass, EncInfo}; use ir; use regalloc...
5
32
2
584a33bca77a05cad59b99e408ee8f9bd6790776
Jakob Stoklund Olesen
2018-01-29T17:16:33
Give better error messages in "test binemit". When an instruction can't be encoded, provide a bit more help: - Detect missing register assignments for input and output operands. - List encodings that where considered and rejected.
diff --git a/cranelift/src/filetest/binemit.rs b/cranelift/src/filetest/binemit.rs index c51f4b613..aca308021 100644 --- a/cranelift/src/filetest/binemit.rs +++ b/cranelift/src/filetest/binemit.rs @@ -7,6 +7,7 @@ use std::borrow::Cow; use std::collections::HashMap; use std::fmt::Write; use cretonne::binemit; +use cr...
1
64
23
3f69581d03ca4974ae6c6d3a7f1a58a1f4050aba
Pat Hickey
2018-01-26T01:11:13
cretonne::Context: add for_function constructor
diff --git a/lib/cretonne/src/context.rs b/lib/cretonne/src/context.rs index 221481a03..8aff5aa70 100644 --- a/lib/cretonne/src/context.rs +++ b/lib/cretonne/src/context.rs @@ -49,8 +49,16 @@ impl Context { /// The returned instance should be reused for compiling multiple functions in order to avoid /// needl...
1
9
1
d56ce9e8bfa0eaf8e3af5c13d92d7b4ea0dcde5c
Jakob Stoklund Olesen
2018-01-24T21:44:51
Optimize DomForest::push_node(). The dominator tree pre-order is defined at the EBB granularity, but we are looking for dominating nodes at the instruction level. This means that we sometimes need to look higher up the DomForest stack for a dominating node, using DominatorTree::dominates() instead of DominatorTreePreo...
diff --git a/lib/cretonne/src/dominator_tree.rs b/lib/cretonne/src/dominator_tree.rs index 4d4e73d40..f7b727368 100644 --- a/lib/cretonne/src/dominator_tree.rs +++ b/lib/cretonne/src/dominator_tree.rs @@ -138,7 +138,7 @@ impl DominatorTree { /// Find the last instruction in `a` that dominates `b`. /// If no...
2
25
13
416b21c18dac3300c5eb95b46c29597da7b32824
Jakob Stoklund Olesen
2018-01-22T20:27:04
Pairwise virtual register coalescing. Use a better algorithm for resolving interferences in virtual registers. This improves code quality by generating much fewer copies on some complicated functions. After the initial union-find phase, the check_vreg() function uses a Budimlic forest to check for interference betwee...
diff --git a/lib/cretonne/src/ir/dfg.rs b/lib/cretonne/src/ir/dfg.rs index 5374138e5..923579d45 100644 --- a/lib/cretonne/src/ir/dfg.rs +++ b/lib/cretonne/src/ir/dfg.rs @@ -317,6 +317,14 @@ impl ValueDef { } } + /// Unwrap the EBB there the parameter is defined, or panic. + pub fn unwrap_ebb(&self...
4
655
183
b124eaf77d016d471eeb7479f2b4ae826e885e48
Jakob Stoklund Olesen
2018-01-23T22:53:59
Add a preorder pre_cmp_def() function. This provides a total ordering of values according to when their definition appears in the dominator tree pre-order.
diff --git a/lib/cretonne/src/dominator_tree.rs b/lib/cretonne/src/dominator_tree.rs index 96fffc5b0..4d4e73d40 100644 --- a/lib/cretonne/src/dominator_tree.rs +++ b/lib/cretonne/src/dominator_tree.rs @@ -2,7 +2,7 @@ use entity::EntityMap; use flowgraph::{ControlFlowGraph, BasicBlock}; -use ir::{Ebb, Inst, Function...
1
15
1
d2e786a78a1927fedf6d021d72b6b218992e0f20
Jakob Stoklund Olesen
2018-01-22T20:40:51
Resurrect the VirtRegs::unify() function. The coalescer needs to be able to merge virtual registers with this function. Updated to recycle all virtual registers.
diff --git a/lib/cretonne/src/regalloc/virtregs.rs b/lib/cretonne/src/regalloc/virtregs.rs index 4fe724cf7..9c3c6616c 100644 --- a/lib/cretonne/src/regalloc/virtregs.rs +++ b/lib/cretonne/src/regalloc/virtregs.rs @@ -149,6 +149,45 @@ impl VirtRegs { self.vregs.push(Default::default()) }) } + ...
1
39
0
085e228358ab472193d0faffb87e486f34383e13
Jakob Stoklund Olesen
2018-01-22T19:31:21
Remove assertions from the hot value_def() function. The errors caught by these assertions are also detected by the IL verifier. Speed up compilation by 13%.
diff --git a/lib/cretonne/src/ir/dfg.rs b/lib/cretonne/src/ir/dfg.rs index 25457000d..5374138e5 100644 --- a/lib/cretonne/src/ir/dfg.rs +++ b/lib/cretonne/src/ir/dfg.rs @@ -164,24 +164,8 @@ impl DataFlowGraph { /// parameter. pub fn value_def(&self, v: Value) -> ValueDef { match self.values[v] { - ...
1
2
18
c6bb7afa07eb0a87b3c9df9486cec8b68696dc23
Jakob Stoklund Olesen
2018-01-22T18:48:14
Dampen quadratic behavior in check_cssa(). Use a dominator tree pre-order to speed up the dominance checks and only check for interference with the nearest dominating predecessor in a virtual register. This makes the CSSA verification about 2x as fast.
diff --git a/lib/cretonne/src/verifier/cssa.rs b/lib/cretonne/src/verifier/cssa.rs index d29b0d72b..c508ed8d4 100644 --- a/lib/cretonne/src/verifier/cssa.rs +++ b/lib/cretonne/src/verifier/cssa.rs @@ -1,7 +1,7 @@ //! Verify conventional SSA form. use dbg::DisplayList; -use dominator_tree::DominatorTree; +use domina...
1
34
13
91343f208d2c6c8c164b23828b3c6d461999aa70
Jakob Stoklund Olesen
2018-01-22T17:21:42
Fix quadratic behavior in sequence numbering. The ir::layout module is assigning sequence numbers to all EBBs and instructions so relative positions can be computed in constant time. This works a lot like BASIC line numbers where we initially use numbers 10, 20, 30, ... so we can insert new instructions in the middle ...
diff --git a/lib/cretonne/src/ir/layout.rs b/lib/cretonne/src/ir/layout.rs index 551055394..e18ffd7a3 100644 --- a/lib/cretonne/src/ir/layout.rs +++ b/lib/cretonne/src/ir/layout.rs @@ -9,6 +9,7 @@ use ir::progpoint::{ProgramOrder, ExpandedProgramPoint}; use packed_option::PackedOption; use std::cmp; use std::iter::{...
2
51
8
10845995a8ef7e77cc05fec1675fa2e918525608
Jakob Stoklund Olesen
2018-01-22T15:51:25
Make room for 4-digit pass timings. (sigh)
diff --git a/lib/cretonne/src/timing.rs b/lib/cretonne/src/timing.rs index e1855cf65..42bbea884 100644 --- a/lib/cretonne/src/timing.rs +++ b/lib/cretonne/src/timing.rs @@ -133,9 +133,9 @@ mod details { impl fmt::Display for PassTimes { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - ...
1
5
5
7826fce44f5e17004f2ce8f6b6ba0a185fbf16d9
Tyler McMullen
2018-01-18T23:33:28
On finding an static OOB heap addr, split the Ebb and recompute the CFG.
diff --git a/lib/cretonne/src/legalizer/heap.rs b/lib/cretonne/src/legalizer/heap.rs index 09736925b..6dd5c1109 100644 --- a/lib/cretonne/src/legalizer/heap.rs +++ b/lib/cretonne/src/legalizer/heap.rs @@ -9,7 +9,7 @@ use ir::{self, InstBuilder, MemFlags}; use ir::condcodes::IntCC; /// Expand a `heap_addr` instructi...
1
10
2
5463fde203e68ee33aa7509a541c59be897b45ed
Jakob Stoklund Olesen
2018-01-17T17:52:31
Don't print unused pressure classes.
diff --git a/lib/cretonne/src/regalloc/pressure.rs b/lib/cretonne/src/regalloc/pressure.rs index 0ee39b07d..c71037efd 100644 --- a/lib/cretonne/src/regalloc/pressure.rs +++ b/lib/cretonne/src/regalloc/pressure.rs @@ -258,7 +258,7 @@ impl fmt::Display for Pressure { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Res...
1
1
1
1e2b7de141221a702e14f08808b5eec5c297adb6
Jakob Stoklund Olesen
2018-01-16T20:34:32
Remove dead code.
diff --git a/lib/cretonne/src/regalloc/virtregs.rs b/lib/cretonne/src/regalloc/virtregs.rs index ce38dc368..4fe724cf7 100644 --- a/lib/cretonne/src/regalloc/virtregs.rs +++ b/lib/cretonne/src/regalloc/virtregs.rs @@ -149,50 +149,6 @@ impl VirtRegs { self.vregs.push(Default::default()) }) } - ...
1
0
44
16ac4f65b3dc3437eb1caa5b8751ec939409312d
Jakob Stoklund Olesen
2018-01-08T21:29:53
Add support for textbook union-find to VirtRegs. The initial phase of computing virtual registers can now be implemented with a textbook union-find algorithm using a disjoint set forest complete with rank and path compression optimizations. The disjoint set forest is converted to virtual register value lists in a sin...
diff --git a/lib/cretonne/src/regalloc/virtregs.rs b/lib/cretonne/src/regalloc/virtregs.rs index b9388277e..ce38dc368 100644 --- a/lib/cretonne/src/regalloc/virtregs.rs +++ b/lib/cretonne/src/regalloc/virtregs.rs @@ -11,11 +11,15 @@ //! If any values in a virtual register are spilled, they will use the same stack slot...
1
333
2
567e570c02e98fe83abcfa8fd5d074677eb06958
Yury Delendik
2018-01-12T20:56:24
Allow to print translated wasm file.
diff --git a/cranelift/src/wasm.rs b/cranelift/src/wasm.rs index 04810e298..800bf7d85 100644 --- a/cranelift/src/wasm.rs +++ b/cranelift/src/wasm.rs @@ -102,6 +102,26 @@ fn handle_module( vprintln!(flag_verbose, "ok"); terminal.reset().unwrap(); if flag_just_decode { + if flag_print { + ...
1
20
0
af89006b09e91517e98947827adf37e7dba430eb
Jakob Stoklund Olesen
2018-01-09T00:18:10
Fix some markdown issues. Work around some cases where the old markdown parser differs from the new Pulldown parser for the documentation.
diff --git a/lib/cretonne/src/ir/dfg.rs b/lib/cretonne/src/ir/dfg.rs index e2328e46d..50842b3fa 100644 --- a/lib/cretonne/src/ir/dfg.rs +++ b/lib/cretonne/src/ir/dfg.rs @@ -705,7 +705,7 @@ impl DataFlowGraph { /// Returns the position of `val` before removal. /// /// *Important*: to ensure O(1) deletion,...
7
53
49
fc857247e467ec8a66cdac7ef87a1688393588fb
Jakob Stoklund Olesen
2017-12-14T23:16:19
Fix overlaps_def for dead live ranges. A dead live range ends at the same point it is defined, but it is still considered to overlap a def at the same program point.
diff --git a/lib/cretonne/src/regalloc/liverange.rs b/lib/cretonne/src/regalloc/liverange.rs index 60079b370..7d7d6a877 100644 --- a/lib/cretonne/src/regalloc/liverange.rs +++ b/lib/cretonne/src/regalloc/liverange.rs @@ -407,6 +407,11 @@ impl<PO: ProgramOrder> GenLiveRange<PO> { ebb: Ebb, ctx: LiveRan...
1
12
0
66073eb26cb4db538e84805c55c0ee97c4326a02
Jakob Stoklund Olesen
2017-12-14T23:04:16
Better verifier error for coinciding defs. If a virtual register contains values that a defined at the same program point, say so. Don't cryptically claim that one dominates the other.
diff --git a/lib/cretonne/src/verifier/cssa.rs b/lib/cretonne/src/verifier/cssa.rs index 5c35f8811..d29b0d72b 100644 --- a/lib/cretonne/src/verifier/cssa.rs +++ b/lib/cretonne/src/verifier/cssa.rs @@ -3,7 +3,7 @@ use dbg::DisplayList; use dominator_tree::DominatorTree; use flowgraph::ControlFlowGraph; -use ir::Funct...
1
14
3
2473661d49b9bc0996b8ef3254066237b98ef276
Jakob Stoklund Olesen
2017-12-12T22:16:01
Loosen the required order of values in a virtual register. Instead of requiring the values in a virtual register to be sorted according to the domtree.rpo_cmp() order, just require any topological ordering w.r.t. dominance. The coalescer with stop using the RPO shortly.
diff --git a/lib/cretonne/src/regalloc/virtregs.rs b/lib/cretonne/src/regalloc/virtregs.rs index 852f1e0af..b9388277e 100644 --- a/lib/cretonne/src/regalloc/virtregs.rs +++ b/lib/cretonne/src/regalloc/virtregs.rs @@ -33,9 +33,6 @@ pub struct VirtRegs { pool: ListPool<Value>, /// The primary table of virtual...
2
23
25
5834520bfebff4ff9884487e72e48225b7b5cc13
Pat Hickey
2017-12-12T21:52:46
binemit: add PIC relocation types for Intel
diff --git a/lib/cretonne/src/binemit/mod.rs b/lib/cretonne/src/binemit/mod.rs index 7851e491a..43665d945 100644 --- a/lib/cretonne/src/binemit/mod.rs +++ b/lib/cretonne/src/binemit/mod.rs @@ -28,6 +28,10 @@ pub enum Reloc { IntelAbs4, /// Intel absolute 8-byte IntelAbs8, + /// Intel GOT PC-relative 4...
1
6
0
362a4bdc4c0f01ee8747940544c21f3cc582005c
Jakob Stoklund Olesen
2017-12-08T01:50:22
Add well-known names for runtime library functions. Add a LibCall type which represents runtime library functions that many be synthesized by Cretonne from pure instructions. Add a LibCall variant to ExternalName to represent one of these runtime functions.
diff --git a/lib/cretonne/src/ir/extname.rs b/lib/cretonne/src/ir/extname.rs index 36cc18d5c..f58f8d24e 100644 --- a/lib/cretonne/src/ir/extname.rs +++ b/lib/cretonne/src/ir/extname.rs @@ -4,7 +4,10 @@ //! function. The name of an external declaration doesn't have any meaning to //! Cretonne, which compiles functions...
4
159
18
60c456c1ec0a2af69a9cfb62ace2b9ec186ea105
Jakob Stoklund Olesen
2017-12-06T18:56:17
Add a compilation pass timing facility. Individual compilation passes call the corresponding timing::*() function and hold on to their timing token while they run. This causes nested per-pass timing information to be recorded in thread-local storage. The --time-passes command line option prints a pass timing report t...
diff --git a/cranelift/src/cton-util.rs b/cranelift/src/cton-util.rs index b08fa8cde..fe121d005 100644 --- a/cranelift/src/cton-util.rs +++ b/cranelift/src/cton-util.rs @@ -10,7 +10,7 @@ extern crate num_cpus; extern crate tempdir; extern crate term; -use cretonne::VERSION; +use cretonne::{VERSION, timing}; use do...
29
305
12
feaea238bccb03dd6c99469832c6af89991ee94d
Jakob Stoklund Olesen
2017-12-04T21:43:10
Use bforest::Map for representing live ranges. Get rid of the per-value Vec in the LiveRange data type and use a bforest::Map instead to represent the live-in intervals for non-local live ranges. This has some advantages: - The memory footprint of a local live range is reduced from 40 to 20 bytes, and - Clearing t...
diff --git a/lib/cretonne/src/regalloc/coalescing.rs b/lib/cretonne/src/regalloc/coalescing.rs index 224e97840..31228f680 100644 --- a/lib/cretonne/src/regalloc/coalescing.rs +++ b/lib/cretonne/src/regalloc/coalescing.rs @@ -157,13 +157,11 @@ impl DomForest { layout, domtree, }; + ...
9
278
214
27d5543adcf863f62d7462dfa83259975401ccda
Jakob Stoklund Olesen
2017-12-04T20:57:04
Make LiveRange a type alias for GenLiveRange<Layout>. This makes the whole LiveRange generic over the program order instead of having a number of methods that are individually program order-generic. This makes is possible to have data members that depend on the program order, as we will shortly. This also gives us st...
diff --git a/lib/cretonne/src/regalloc/liverange.rs b/lib/cretonne/src/regalloc/liverange.rs index 7b94fce28..840c88222 100644 --- a/lib/cretonne/src/regalloc/liverange.rs +++ b/lib/cretonne/src/regalloc/liverange.rs @@ -108,9 +108,10 @@ //! use entity::SparseMapValue; -use ir::{Inst, Ebb, Value, ProgramPoint, Expa...
1
32
31
c09ad06f96f055b1207032dee3c6779677922b84
Jakob Stoklund Olesen
2017-12-06T00:31:10
Stop generating reserved_reg heaps in DummyEnvironment. The reserved register heaps are not implemented in the Cretonne legalizer, so IR generated by the dummy environment would trip assertions when compiled. Use a heap with a vmctx base address instead, and also demonstrate how vmctx arguments are added to all signa...
diff --git a/lib/wasm/src/environ/dummy.rs b/lib/wasm/src/environ/dummy.rs index 8c9c7c3d8..90ed3ffb1 100644 --- a/lib/wasm/src/environ/dummy.rs +++ b/lib/wasm/src/environ/dummy.rs @@ -124,6 +124,17 @@ impl<'dummy_environment> DummyFuncEnvironment<'dummy_environment> { pub fn new(mod_info: &'dummy_environment Dumm...
1
74
11
b8fe6bf0f5d8099c93f9484d60def1e508b18ce3
Jakob Stoklund Olesen
2017-12-05T18:01:35
Add a MapCursor::value_mut() method. It's ok to alter a value stored in a map, but not the keys.
diff --git a/lib/cretonne/src/bforest/map.rs b/lib/cretonne/src/bforest/map.rs index 3c5fe7fb9..5aa19bced 100644 --- a/lib/cretonne/src/bforest/map.rs +++ b/lib/cretonne/src/bforest/map.rs @@ -306,6 +306,13 @@ where }) } + /// Get a mutable reference to the current value, or `None` if the cursor is a...
1
7
0
c64428b6984b3a3314ddd5ffe985ae4c14f4b894
Jakob Stoklund Olesen
2017-12-04T22:03:54
Add a Map::get_or_less() method. Find the largest (k,v) pair with k <= key.
diff --git a/lib/cretonne/src/bforest/map.rs b/lib/cretonne/src/bforest/map.rs index bf288582e..3c5fe7fb9 100644 --- a/lib/cretonne/src/bforest/map.rs +++ b/lib/cretonne/src/bforest/map.rs @@ -102,6 +102,23 @@ where }) } + /// Look up the value stored for `key`. + /// + /// If it exists, return...
1
25
0
3b937f59170b5b479b8616fe847aedf88f658869
Tyler McMullen
2017-12-05T18:55:24
Add separate spiderwasm prologue/epilogue to intel's abi.rs
diff --git a/lib/cretonne/src/isa/intel/abi.rs b/lib/cretonne/src/isa/intel/abi.rs index 733c2a3eb..965283d82 100644 --- a/lib/cretonne/src/isa/intel/abi.rs +++ b/lib/cretonne/src/isa/intel/abi.rs @@ -7,6 +7,7 @@ use settings as shared_settings; use super::registers::{GPR, FPR, RU}; use abi::{ArgAction, ValueConversi...
1
30
7
694658b9494f8e6e3d764aa58e2441ba8b81fb73
Tyler McMullen
2017-12-04T08:01:53
Move entirety of prologue_epilogue logic to abi module.
diff --git a/lib/cretonne/src/isa/intel/abi.rs b/lib/cretonne/src/isa/intel/abi.rs index fdb0d0fe1..1a6aa0aef 100644 --- a/lib/cretonne/src/isa/intel/abi.rs +++ b/lib/cretonne/src/isa/intel/abi.rs @@ -1,13 +1,18 @@ //! Intel ABI implementation. use ir; -use isa::{RegClass, RegUnit}; +use isa::{RegClass, RegUnit, Ta...
2
137
123
0fb59dc5895edb86d9129d6e7a501d49e4e1d235
Tyler McMullen
2017-12-04T07:40:26
Fix the ordering of return values.
diff --git a/lib/cretonne/src/isa/intel/mod.rs b/lib/cretonne/src/isa/intel/mod.rs index 3abad93aa..541f32972 100644 --- a/lib/cretonne/src/isa/intel/mod.rs +++ b/lib/cretonne/src/isa/intel/mod.rs @@ -221,16 +221,19 @@ impl Isa { pos.ins().adjust_sp_imm(Imm64::new(stack_size)); } + let fp...
1
9
6
c156eb9ff72e571bf167f11baba3fca918a0a03d
Tyler McMullen
2017-12-04T07:25:32
Refactor prologue_epilogue. Break out into functions. Remove Vecs.
diff --git a/lib/cretonne/src/isa/intel/abi.rs b/lib/cretonne/src/isa/intel/abi.rs index 0257c6658..fdb0d0fe1 100644 --- a/lib/cretonne/src/isa/intel/abi.rs +++ b/lib/cretonne/src/isa/intel/abi.rs @@ -154,10 +154,10 @@ pub fn allocatable_registers( regs } -pub fn callee_saved_registers(flags: &shared_settings::...
2
64
83
c78a191294518c9c2e3a9152f7933efad9d309e7
Tyler McMullen
2017-12-03T01:20:42
Use layout.last_inst to find 'return' opcodes, rather than iterating.
diff --git a/lib/cretonne/src/isa/intel/mod.rs b/lib/cretonne/src/isa/intel/mod.rs index 100621bac..6446c755d 100644 --- a/lib/cretonne/src/isa/intel/mod.rs +++ b/lib/cretonne/src/isa/intel/mod.rs @@ -15,7 +15,7 @@ use self::registers::RU; use ir; use regalloc; use result; -use ir::{InstBuilder, InstructionData, Opc...
1
2
2
66eccb785995bdc2f2f4f1297a9e288b0e76fb44
Tyler McMullen
2017-12-02T23:45:47
Use opcode's is_return() rather than pattern-matching.
diff --git a/lib/cretonne/src/isa/intel/mod.rs b/lib/cretonne/src/isa/intel/mod.rs index d39905c9b..100621bac 100644 --- a/lib/cretonne/src/isa/intel/mod.rs +++ b/lib/cretonne/src/isa/intel/mod.rs @@ -208,12 +208,9 @@ impl TargetIsa for Isa { let mut return_insts = Vec::new(); for ebb in func.layout.e...
1
2
5
a26d438b3045e9e67199f228f485d47f1a3109cd
Tyler McMullen
2017-12-02T23:43:41
Use returned Value from append_ebb_param in prologue_epilogue.
diff --git a/lib/cretonne/src/isa/intel/mod.rs b/lib/cretonne/src/isa/intel/mod.rs index 78bec9dbf..d39905c9b 100644 --- a/lib/cretonne/src/isa/intel/mod.rs +++ b/lib/cretonne/src/isa/intel/mod.rs @@ -169,11 +169,7 @@ impl TargetIsa for Isa { // Append param to entry EBB let entry_ebb = func.layout....
1
4
12
2f3edc1bc601fd7a1996febee9a096a21dbb2eb5
Tyler McMullen
2017-12-01T06:44:38
Fix issue in which CSR returns were incorrectly ordered.
diff --git a/lib/cretonne/src/isa/intel/mod.rs b/lib/cretonne/src/isa/intel/mod.rs index 3e90acc93..a5a395447 100644 --- a/lib/cretonne/src/isa/intel/mod.rs +++ b/lib/cretonne/src/isa/intel/mod.rs @@ -143,23 +143,27 @@ impl TargetIsa for Isa { let total_stack_size = layout_stack(&mut func.stack_slots, word_siz...
1
14
10
daa7a21d056c4a29c1d8292d71b053176e252476
Tyler McMullen
2017-12-01T02:50:56
Adjust prologue/epilogue generation to work with 32-bit Intel arch.
diff --git a/lib/cretonne/src/isa/intel/abi.rs b/lib/cretonne/src/isa/intel/abi.rs index 2aa83703c..0257c6658 100644 --- a/lib/cretonne/src/isa/intel/abi.rs +++ b/lib/cretonne/src/isa/intel/abi.rs @@ -15,9 +15,6 @@ static ARG_GPRS: [RU; 6] = [RU::rdi, RU::rsi, RU::rdx, RU::rcx, RU::r8, RU::r9]; /// Return value regist...
2
33
15
cf9d287beaeea82d577dce8c48eff70a1513c2ce
Tyler McMullen
2017-11-30T01:43:06
Pop the callee-saved registers in the function epilogue(s).
diff --git a/lib/cretonne/src/isa/intel/mod.rs b/lib/cretonne/src/isa/intel/mod.rs index 50575d28a..0d63a1522 100644 --- a/lib/cretonne/src/isa/intel/mod.rs +++ b/lib/cretonne/src/isa/intel/mod.rs @@ -216,9 +216,7 @@ impl TargetIsa for Isa { // Insert an epilogue directly before every 'return' for i...
1
16
10
f31a764fc8d1ac386fab16b5436ec71b6f09cb1a
Tyler McMullen
2017-11-30T00:34:21
Save all callee-saved registers in prologue.
diff --git a/lib/cretonne/src/isa/intel/abi.rs b/lib/cretonne/src/isa/intel/abi.rs index e8be53e84..2aa83703c 100644 --- a/lib/cretonne/src/isa/intel/abi.rs +++ b/lib/cretonne/src/isa/intel/abi.rs @@ -15,6 +15,9 @@ static ARG_GPRS: [RU; 6] = [RU::rdi, RU::rsi, RU::rdx, RU::rcx, RU::r8, RU::r9]; /// Return value regist...
2
43
5
b049916d353980a1fea5779ffc9a5826a9c4fe09
Tyler McMullen
2017-11-29T11:16:37
Move %rsp to %rbp, not the reverse. This also takes away %rsp and %rbp from regalloc again. This may cause tests to fail temporarily.
diff --git a/lib/cretonne/src/isa/intel/abi.rs b/lib/cretonne/src/isa/intel/abi.rs index 0c45a0e22..e8be53e84 100644 --- a/lib/cretonne/src/isa/intel/abi.rs +++ b/lib/cretonne/src/isa/intel/abi.rs @@ -140,8 +140,8 @@ pub fn allocatable_registers( flags: &shared_settings::Flags, ) -> AllocatableSet { let mut ...
2
3
3
e0c8ab49e15215a8c917845f6a1b1648e97c4fc9
Tyler McMullen
2017-11-29T10:32:20
Only emit an adjust_sp_imm if the stack_size is non-zero.
diff --git a/lib/cretonne/src/isa/intel/mod.rs b/lib/cretonne/src/isa/intel/mod.rs index c6dfeb937..cfca41083 100644 --- a/lib/cretonne/src/isa/intel/mod.rs +++ b/lib/cretonne/src/isa/intel/mod.rs @@ -162,11 +162,13 @@ impl TargetIsa for Isa { RU::rbp as RegUnit, RU::rsp as RegUnit, ...
1
8
3
d12587f2189ebefedc10d29557ed24d90d8fb01b
Tyler McMullen
2017-11-29T10:28:18
Assign explicit register location to result of frame-pointer pop.
diff --git a/lib/cretonne/src/isa/intel/mod.rs b/lib/cretonne/src/isa/intel/mod.rs index d96fbf1cd..c6dfeb937 100644 --- a/lib/cretonne/src/isa/intel/mod.rs +++ b/lib/cretonne/src/isa/intel/mod.rs @@ -180,6 +180,7 @@ impl TargetIsa for Isa { for inst in return_insts { let fp_ret = self.insert_ep...
1
1
0
544c148b25926af010518b706af4f23e721e98e6
Tyler McMullen
2017-11-29T04:09:27
Fix the stack slots, so the locations of local var slots are correct.
diff --git a/lib/cretonne/src/isa/intel/mod.rs b/lib/cretonne/src/isa/intel/mod.rs index 60982b438..d96fbf1cd 100644 --- a/lib/cretonne/src/isa/intel/mod.rs +++ b/lib/cretonne/src/isa/intel/mod.rs @@ -122,8 +122,17 @@ impl TargetIsa for Isa { let word_size = if self.flags().is_64bit() { 8 } else { 4 }; ...
1
13
4
c1a64a5dc7affbf557f04c18d2e87dcdfc3c46ba
Tyler McMullen
2017-11-29T03:51:19
Insert a basic epilogue.
diff --git a/lib/cretonne/src/isa/intel/mod.rs b/lib/cretonne/src/isa/intel/mod.rs index 48106cce2..60982b438 100644 --- a/lib/cretonne/src/isa/intel/mod.rs +++ b/lib/cretonne/src/isa/intel/mod.rs @@ -15,8 +15,9 @@ use self::registers::RU; use ir; use regalloc; use result; -use ir::InstBuilder; -use legalizer; +use ...
1
47
14
60b6bc3ab726672bf5ddf0cdadb5a3cf8b790d87
Tyler McMullen
2017-11-29T01:25:39
Sketch of prologue generation
diff --git a/lib/cretonne/src/isa/intel/mod.rs b/lib/cretonne/src/isa/intel/mod.rs index a8b631452..48106cce2 100644 --- a/lib/cretonne/src/isa/intel/mod.rs +++ b/lib/cretonne/src/isa/intel/mod.rs @@ -10,9 +10,14 @@ use binemit::{CodeSink, MemoryCodeSink, emit_function}; use super::super::settings as shared_settings; ...
1
46
1
9108725b74c83d8438c57e7ca78d796c35ed2ffa
Pat Hickey
2017-11-23T01:51:42
extname: extend testcases to 16 chars this is sufficient for all filetests to pass without truncating
diff --git a/lib/cretonne/src/ir/extname.rs b/lib/cretonne/src/ir/extname.rs index 290a40d9f..36cc18d5c 100644 --- a/lib/cretonne/src/ir/extname.rs +++ b/lib/cretonne/src/ir/extname.rs @@ -6,7 +6,7 @@ use std::fmt::{self, Write}; -const TESTCASE_NAME_LENGTH: usize = 10; +const TESTCASE_NAME_LENGTH: usize = 16; ...
1
6
6
eb49d9f8bffe3849b545fd203cc0b25369e9381e
Pat Hickey
2017-11-23T01:37:08
tests: update ExternalName api
diff --git a/lib/cretonne/src/write.rs b/lib/cretonne/src/write.rs index b4276349d..9de3e93d5 100644 --- a/lib/cretonne/src/write.rs +++ b/lib/cretonne/src/write.rs @@ -447,9 +447,9 @@ mod tests { #[test] fn basic() { let mut f = Function::new(); - assert_eq!(f.to_string(), "function %() nativ...
4
7
7
803b83c87a260e7f5e6d23dc6ccd81c1150b12b7
Pat Hickey
2017-11-23T01:18:54
wasm: change to new externalname api
diff --git a/lib/wasm/src/environ/dummy.rs b/lib/wasm/src/environ/dummy.rs index 64733684b..8c9c7c3d8 100644 --- a/lib/wasm/src/environ/dummy.rs +++ b/lib/wasm/src/environ/dummy.rs @@ -13,7 +13,7 @@ use std::error::Error; /// Compute a `ir::ExternalName` for a given wasm function index. fn get_func_name(func_index:...
1
1
1
1216f81b90793f57f51d691a399b66c53c977e40
Pat Hickey
2017-11-23T00:52:08
parser: replace binary function name test case with user names
diff --git a/lib/reader/src/parser.rs b/lib/reader/src/parser.rs index 03516fa91..d809cd192 100644 --- a/lib/reader/src/parser.rs +++ b/lib/reader/src/parser.rs @@ -2584,45 +2584,50 @@ mod tests { } #[test] - fn binary_function_name() { - // Valid characters in the name. + fn user_function_name...
1
21
16
2dfc78dbcd7a501456020ce0db5834fc96dd58bc
Pat Hickey
2017-11-23T00:15:31
reader: lex UserRefs and parse ExternalName::Users
diff --git a/lib/reader/src/lexer.rs b/lib/reader/src/lexer.rs index 1c422a802..ca315d3b5 100644 --- a/lib/reader/src/lexer.rs +++ b/lib/reader/src/lexer.rs @@ -38,6 +38,7 @@ pub enum Token<'a> { JumpTable(u32), // jt2 FuncRef(u32), // fn2 SigRef(u32), // sig2 + UserRef(u32), // u345 Name(&'a str...
2
33
16
894268233edf7bba32714f298dbcffae90d0feb7
Pat Hickey
2017-11-22T22:40:54
ir::ExternalName representation and constructors rewritten
diff --git a/lib/cretonne/src/ir/extname.rs b/lib/cretonne/src/ir/extname.rs index ba5ddba40..290a40d9f 100644 --- a/lib/cretonne/src/ir/extname.rs +++ b/lib/cretonne/src/ir/extname.rs @@ -5,10 +5,12 @@ //! Cretonne, which compiles functions independently. use std::fmt::{self, Write}; -#[allow(unused_imports)] -use...
1
79
82
95bdf91e3efd45ca1ca12e14893d173b3427596a
Jakob Stoklund Olesen
2017-11-22T21:52:42
Use a bforest::Map for the predecessors in the CFG. Like before, we store a redundant EBB with each predecessor instruction which allows invalidate_ebb_successors() to clean up the successor's predecessor lists even after instructions have been moved around in the layout.
diff --git a/lib/cretonne/src/flowgraph.rs b/lib/cretonne/src/flowgraph.rs index a2c27828f..10eff7785 100644 --- a/lib/cretonne/src/flowgraph.rs +++ b/lib/cretonne/src/flowgraph.rs @@ -28,7 +28,6 @@ use ir::{Function, Inst, Ebb}; use ir::instructions::BranchInfo; use entity::EntityMap; use std::mem; -use std::slice;...
1
30
9
a960730add4ad4d3d5248187da6a14a78b621097
Jakob Stoklund Olesen
2017-11-22T21:43:41
Add retain() methods to bforest::{Set,Map}. These work just like their counterparts in HashMap and HashSet.
diff --git a/lib/cretonne/src/bforest/map.rs b/lib/cretonne/src/bforest/map.rs index 601e9febe..bf288582e 100644 --- a/lib/cretonne/src/bforest/map.rs +++ b/lib/cretonne/src/bforest/map.rs @@ -130,6 +130,32 @@ where } } + /// Retains only the elements specified by the predicate. + /// + /// Rem...
2
59
0
c810b21488f721e7c97a34c28df278dec30fa032
Jakob Stoklund Olesen
2017-11-22T19:48:47
Be more forgiving about what's a "slow" test. This was supposed to be Q3 + 1.5 IQR, but a braino meant we actually used Q3 + 2/3 IQR. Since the distribution of test case times is far from gaussian, bump the "slow" limit up even further to Q3 + 3 IQR.
diff --git a/cranelift/src/filetest/runner.rs b/cranelift/src/filetest/runner.rs index 8e0f7721a..320db9d94 100644 --- a/cranelift/src/filetest/runner.rs +++ b/cranelift/src/filetest/runner.rs @@ -302,9 +302,12 @@ impl TestRunner { // Inter-quartile range. let iqr = q3 - q1; - // Cut-off for ...
1
6
3
8e2ce6ded284018b7d45ba97102f26d20cfbaee7
Jakob Stoklund Olesen
2017-11-22T19:35:03
Revert "Enable pager in cton-util." This reverts commit 0538615ccc0b600d4f534dae2ee966d5ed0df9b7. Fixes #196. The pager functionality wasn't working as intended since long error messages appear on stdout which isn't captured by the pager.
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index b328febdd..45b39ef0a 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -26,9 +26,6 @@ num_cpus = "1.5.1" tempdir="0.3.5" term = "0.4.6" -[target.'cfg(unix)'.dependencies] -pager = "0.13.0" - [workspace] # Enable debug assertions and pa...
2
0
21
92f378de76a3d00de703547ce515bf3e5d2a1e38
Jakob Stoklund Olesen
2017-11-22T17:13:04
Expose CFG predecessors only as an iterator. Define two public iterator types in the flowgraph module, PredIter and SuccIter, which are by-value iterators over an EBB's predecessors and successors respectively. Provide matching pred_iter() and succ_iter() methods for inspecting the CFG. Remove the get_predecessors() ...
diff --git a/cranelift/src/print_cfg.rs b/cranelift/src/print_cfg.rs index bc3fc3dd9..8d2b06c8f 100644 --- a/cranelift/src/print_cfg.rs +++ b/cranelift/src/print_cfg.rs @@ -76,7 +76,7 @@ impl<'a> CFGPrinter<'a> { fn cfg_connections(&self, w: &mut Write) -> Result { for ebb in &self.func.layout { - ...
12
61
54
7956084121622e44c64262bb8c8ececfbd7848b9
Tyler McMullen
2017-11-22T01:08:31
Treat VmContext as positional when using Native CallConv (#195) * Treat VMContext as standard positional argument when using Native CallConv. This requires threading the CallConv through legalize_args and into ArgAssigner. * Stash CallConv in the intel-specific Args struct, for use ArgAssigner.
diff --git a/lib/cretonne/src/isa/intel/abi.rs b/lib/cretonne/src/isa/intel/abi.rs index 3cd3dce93..e8be53e84 100644 --- a/lib/cretonne/src/isa/intel/abi.rs +++ b/lib/cretonne/src/isa/intel/abi.rs @@ -6,7 +6,7 @@ use regalloc::AllocatableSet; use settings as shared_settings; use super::registers::{GPR, FPR, RU}; use...
1
8
7
b5d4fb66d906d67155f7f55538a130baa2d2b3cb
Jakob Stoklund Olesen
2017-11-20T22:02:16
Use a bforest::Set to represent CFG successor sets. This has two advantages over the previous Vec<Ebb>: - Duplicates are removed. - Clearing the control flow graph is constant time. The set of EBB successors is simply ordered by EBB number.
diff --git a/lib/cretonne/src/flowgraph.rs b/lib/cretonne/src/flowgraph.rs index 1f51ef0cf..4b411ff2b 100644 --- a/lib/cretonne/src/flowgraph.rs +++ b/lib/cretonne/src/flowgraph.rs @@ -23,6 +23,7 @@ //! Here `Ebb1` and `Ebb2` would each have a single predecessor denoted as `(Ebb0, brz)` //! and `(Ebb0, jmp Ebb2)` res...
3
40
42
cf45afa1e77eb0e192391d01c72278edc33b0d1f
Jakob Stoklund Olesen
2017-11-21T17:45:52
Avoid the CFG get_successors() when computing a post-order. The control flow graph does not guarantee any particular ordering for its successor lists, and the post-order we are computing for building the dominator tree needs to be "split-invariant". See #146 for details. - Discover EBB successors directly from the E...
diff --git a/cranelift/tests/cfg_traversal.rs b/cranelift/tests/cfg_traversal.rs index 73b4b9fad..6709da2e9 100644 --- a/cranelift/tests/cfg_traversal.rs +++ b/cranelift/tests/cfg_traversal.rs @@ -26,6 +26,30 @@ fn test_reverse_postorder_traversal(function_source: &str, ebb_order: Vec<u32>) #[test] fn simple_traver...
3
206
31
2e0b931590197e46edf55cc88fcb27f5504000ea
Jakob Stoklund Olesen
2017-11-21T18:00:30
Provide an fmt::Debug impl for entity references. Instead of deriving a Debug impl: Ebb(45), use the Display version for Debug too: ebb45. This is more readable, and no information is lost.
diff --git a/lib/cretonne/src/bforest/mod.rs b/lib/cretonne/src/bforest/mod.rs index b1d4aa3c2..ff1b94cc0 100644 --- a/lib/cretonne/src/bforest/mod.rs +++ b/lib/cretonne/src/bforest/mod.rs @@ -97,7 +97,7 @@ trait Forest { } /// A reference to a B+-tree node. -#[derive(Clone, Copy, Debug, PartialEq, Eq)] +#[derive(C...
5
25
13
2d7b54373f0581a894a7c7c6eed641c44d678594
Jakob Stoklund Olesen
2017-11-20T22:42:47
Implement Clone and Default for bforest::{Set,Map}. The default container is empty. We need a manual implementation of Default because deriving it seems to imply that K and V generic parameter types must also implement Default. Cloning can be used to clone an empty container or for cloning the whole forest. We can de...
diff --git a/lib/cretonne/src/bforest/map.rs b/lib/cretonne/src/bforest/map.rs index 23cac5600..601e9febe 100644 --- a/lib/cretonne/src/bforest/map.rs +++ b/lib/cretonne/src/bforest/map.rs @@ -61,6 +61,11 @@ where /// /// This is not a general-purpose replacement for `BTreeMap`. See the [module /// documentation](in...
2
31
0
8eaf7d3904dff4545ea84e0f9011d9914e9b1a30
Jakob Stoklund Olesen
2017-11-20T21:24:19
Add iterators for bforest::{Set,Map}. The iter() methods return an iterator that traverses all set elements / map key-value pairs. The iterator doesn't require a mutable container and forest reference, unlike the cursor types.
diff --git a/lib/cretonne/src/bforest/map.rs b/lib/cretonne/src/bforest/map.rs index 0cc1364c4..23cac5600 100644 --- a/lib/cretonne/src/bforest/map.rs +++ b/lib/cretonne/src/bforest/map.rs @@ -134,6 +134,15 @@ where ) -> MapCursor<'a, K, V, C> { MapCursor::new(self, forest, comp) } + + /// Create ...
3
102
3
a2ff2a6836119167217f65ee220bdf45d0e3960b
Jakob Stoklund Olesen
2017-11-20T20:31:51
Add goto_first() methods to SetCursor and MapCursor.
diff --git a/lib/cretonne/src/bforest/map.rs b/lib/cretonne/src/bforest/map.rs index 45ff290cc..0cc1364c4 100644 --- a/lib/cretonne/src/bforest/map.rs +++ b/lib/cretonne/src/bforest/map.rs @@ -254,6 +254,11 @@ where }) } + /// Move this cursor to the first element. + pub fn goto_first(&mut self) -...
3
40
3
3389eaef296cb04068cb32b1142fb5ef2b984802
Jakob Stoklund Olesen
2017-11-20T19:08:25
Add a clear() method to bforest::{Set,Map}. This is a lot more efficient that removing entries one by one.
diff --git a/lib/cretonne/src/bforest/map.rs b/lib/cretonne/src/bforest/map.rs index e9709c0b1..45ff290cc 100644 --- a/lib/cretonne/src/bforest/map.rs +++ b/lib/cretonne/src/bforest/map.rs @@ -118,6 +118,13 @@ where } } + /// Remove all entries. + pub fn clear(&mut self, forest: &mut MapForest<K, ...
3
42
0
d3778e56bbfb4f7dc6de4c9b4cf70708e2c7a6f1
Jakob Stoklund Olesen
2017-11-20T22:09:25
Remove the "BPlus" prefix from bforest::* types. We'll just use the bforest:: namespace for these types, avoiding the confusing mix of prefixed and non-prefixed names. No functional change intended.
diff --git a/lib/cretonne/src/bforest/map.rs b/lib/cretonne/src/bforest/map.rs index 43855c476..e9709c0b1 100644 --- a/lib/cretonne/src/bforest/map.rs +++ b/lib/cretonne/src/bforest/map.rs @@ -2,7 +2,7 @@ use packed_option::PackedOption; use std::marker::PhantomData; -use super::{INNER_SIZE, BPlusComparator, Forest...
5
61
61
d51a4c1065f2e274763a11d3214de716b1ec6aea
Dan Gohman
2017-11-18T00:03:40
Replace FunctionBuilder's Drop impl with a finalize function. (#193) * Replace FunctionBuilder's Drop impl with a finalize function. This has the advantage of not triggering assertion failures in the event of abandoning a partially-built function. It has the disadvantage of requiring users to call finalize() expl...
diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index ac86e3d64..5127270cb 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -8,6 +8,7 @@ use cretonne::ir::function::DisplayFunction; use cretonne::isa::TargetIsa; use ssa::{SSABuilder, SideEffects, Block}; use cr...
3
85
57
29db33e7f8cdb0ed1c63400911fef187408a2992
Dan Gohman
2017-11-17T19:14:02
Replace reserve with reserve_exact when applicable.
diff --git a/lib/runtime/src/instance.rs b/lib/runtime/src/instance.rs index ad0345c2c..7b07ad0bd 100644 --- a/lib/runtime/src/instance.rs +++ b/lib/runtime/src/instance.rs @@ -38,7 +38,7 @@ impl Instance { /// without any initializers applied yet. fn instantiate_tables(&mut self, module: &Module) { ...
1
2
2
46ac24d172b5829088772bda4a82f503a4b2ee2d
Dan Gohman
2017-11-17T19:13:14
Add a comment about call_indirect bounds/signature checking.
diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs index 9a5f074fd..8c91be56f 100644 --- a/lib/runtime/src/lib.rs +++ b/lib/runtime/src/lib.rs @@ -287,6 +287,8 @@ impl<'module_environment> cton_wasm::FuncEnvironment for FuncEnvironment<'module callee: ir::Value, call_args: &[ir::Value], ...
1
2
0