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
923ea8ada9f68d9e9910ccf9649b14c9b06df67e
Dan Gohman
2018-05-17T21:19:42
Add assertions to check that postopt encoding succeeds.
diff --git a/lib/codegen/src/postopt.rs b/lib/codegen/src/postopt.rs index 6de918d08..50661f4cc 100644 --- a/lib/codegen/src/postopt.rs +++ b/lib/codegen/src/postopt.rs @@ -169,8 +169,10 @@ fn optimize_cpu_flags( ); } } - pos.func.update_encoding(info.cmp_inst, isa).is_ok(); - pos.func....
1
6
3
e9d362d90268f5c152f34c5f8f610aece3165439
Amanieu d'Antras
2018-05-18T22:40:08
Improve coalescing performance by using a FxHashMap (#340) * Use FxHashMap instead of HashMap for better performance * Replace the binary search in the coalescing pass with a FxHashMap This speeds up coalescing by up to 16% and overall compilation by 9%
diff --git a/lib/codegen/src/fx.rs b/lib/codegen/src/fx.rs new file mode 100644 index 000000000..b59bac27b --- /dev/null +++ b/lib/codegen/src/fx.rs @@ -0,0 +1,111 @@ +// This file is taken from the Rust compiler: src/librustc_data_structures/fx.rs + +// Copyright 2015 The Rust Project Developers. See the COPYRIGHT +//...
6
130
26
80fdfb23762bbe79800f6e24b87dd2707520ed23
Amanieu d'Antras
2018-05-18T19:54:00
Optimize partition_slice (#341) * Generate debug symbols in optimized builds. This allows profiling tools to provide more accurate information, especially details about inlined functions. * Rewrite and optimize partition_slice This improves the performance of the register allocation passes which use LiveVal...
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index cf3cbe5aa..b807c2fe0 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -32,3 +32,11 @@ term = "0.5.1" capstone = "0.3.1" [workspace] + +# We want debug symbols on release binaries by default since it allows profiling +# tools to give more ...
2
46
18
46a772ba67ffb54dfbd743297d0bf6de153f20d2
Dan Gohman
2018-05-18T06:59:40
Add a TODO about avoiding ReadWriteExecute mappings.
diff --git a/lib/execute/src/lib.rs b/lib/execute/src/lib.rs index 0e98adca1..af7ab9535 100644 --- a/lib/execute/src/lib.rs +++ b/lib/execute/src/lib.rs @@ -84,6 +84,8 @@ pub fn execute( let start_index = compilation.module.start_func.ok_or_else(|| { String::from("No start function defined, aborting execu...
1
2
0
52f1171485313d84036c5bd1d9d8ef27694d2b8d
Dan Gohman
2018-05-18T06:56:05
Make all the function bodies executable, not just the start function.
diff --git a/lib/execute/src/lib.rs b/lib/execute/src/lib.rs index 5b1d939b1..0e98adca1 100644 --- a/lib/execute/src/lib.rs +++ b/lib/execute/src/lib.rs @@ -84,23 +84,26 @@ pub fn execute( let start_index = compilation.module.start_func.ok_or_else(|| { String::from("No start function defined, aborting exe...
1
17
14
d162f8bc59ff395c0bb06a091868e29567c76891
Dan Gohman
2018-05-18T06:27:00
Implement Abs8 relocations, and fix X86PCRel4 relocations. With new versions of cretonne-codegen: - Non-colocated calls are emitted as a movabs with an indirect call. This uses an Abs8 relocation. - Colocated calls are emitted as direct calls, but the "+ 4" adjustment is now folded into the addend, so we don...
diff --git a/lib/execute/src/lib.rs b/lib/execute/src/lib.rs index 568799682..5b1d939b1 100644 --- a/lib/execute/src/lib.rs +++ b/lib/execute/src/lib.rs @@ -8,6 +8,7 @@ extern crate region; extern crate wasmstandalone_runtime; use cretonne_codegen::isa::TargetIsa; +use cretonne_codegen::binemit::Reloc; use std::me...
1
17
5
9d41135fe30df498be4e9fb426a8e8d8cf71f9f3
Dan Gohman
2018-05-18T03:39:19
Translate from function-body index to function-index-space index. The wasm function index space consists of the index space of the imported functions concatenated with the index space of the defined functions. When iterating through function definitions, it's necessary to adjust the index when a function-index-space i...
diff --git a/lib/runtime/src/lib.rs b/lib/runtime/src/lib.rs index 45a3ac8c3..e8e5d5460 100644 --- a/lib/runtime/src/lib.rs +++ b/lib/runtime/src/lib.rs @@ -569,7 +569,8 @@ impl<'data, 'module> ModuleTranslation<'data, 'module> { ) -> Result<(Compilation<'module>, Relocations), String> { let mut functions...
1
2
1
4c150907bf13a96b4f0a7ad8728919c4d122c358
Dan Gohman
2018-05-15T06:05:14
Issue better error messages in use_var and def_var. Include the name of the variable when diagnosing uses and defs of undeclared variables. And, add an assert to def_var to check that the declared type of a variable matches the value type of the def. With this change, `Variable` implementations must now implement `De...
diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index b2e638572..20aac932c 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -10,6 +10,7 @@ use cretonne_codegen::ir::{DataFlowGraph, Ebb, ExtFuncData, FuncRef, Function, G use cretonne_codegen::isa::TargetIsa; use ...
1
39
20
f986acfe7c7c39ac69b47fc9b99a31f754b7bf13
Dan Gohman
2018-05-12T15:51:20
Correct an assert message, spotted by @MarkSwanson
diff --git a/lib/module/src/module.rs b/lib/module/src/module.rs index f3073f846..409adf97c 100644 --- a/lib/module/src/module.rs +++ b/lib/module/src/module.rs @@ -574,7 +574,7 @@ where let info = &self.contents.functions[func]; debug_assert!( info.decl.linkage.is_definable()...
1
1
1
842cd13bd1dcb6ef9971fd6ff550cbca486689c2
Dan Gohman
2018-05-09T17:52:18
Improve the error message when python isn't installed.
diff --git a/lib/codegen/build.rs b/lib/codegen/build.rs index 69100ef00..87d4b754a 100644 --- a/lib/codegen/build.rs +++ b/lib/codegen/build.rs @@ -67,7 +67,9 @@ fn main() { .arg("--out-dir") .arg(out_dir) .status() - .expect("Failed to launch second-level build script"); + .ex...
1
3
1
b5e794a5847f7d511daa7687f07d3d1f01b81616
Dan Gohman
2018-05-14T22:58:28
Update to Cretonne 0.8.0.
diff --git a/Cargo.toml b/Cargo.toml index 79ef2f16c..9bde01f62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,18 +17,18 @@ name = "wasm2obj" path = "src/wasm2obj.rs" [dependencies] -cretonne = "0.4.0" -cretonne-frontend = "0.4.0" -cretonne-reader = "0.4.0" -cretonne-wasm = "0.4.0" -cretonne-native = "0.4.0" +cret...
13
117
105
07c65bab1107bc6bb5f25cfe750412007beb36d6
Bruce Mitchener
2018-05-14T19:27:14
Update to docopt 1.0. (#332)
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index 3edf07897..cf3cbe5aa 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -24,7 +24,7 @@ cretonne-faerie = { path = "lib/faerie", version = "0.8.0" } cretonne-simplejit = { path = "lib/simplejit", version = "0.8.0" } cretonne = { path = "lib/um...
1
1
1
5c2ada88f5dd01fe36e258400bc612f221002f6f
Dan Gohman
2018-05-01T12:37:56
Add support for target_os = "nebulet". (#319)
diff --git a/lib/native/src/lib.rs b/lib/native/src/lib.rs index ff3d0632c..f5050bea7 100644 --- a/lib/native/src/lib.rs +++ b/lib/native/src/lib.rs @@ -34,7 +34,7 @@ use raw_cpuid::CpuId; pub fn builders() -> Result<(settings::Builder, isa::Builder), &'static str> { let mut flag_builder = settings::builder(); ...
1
1
1
8fa0e6da99f0052123bae633c118d6990405dc05
Dan Gohman
2018-04-30T23:46:14
Fix simplejit's memory size computations. @steffengy noticed that the code to round allocation sizes up to the neareset page size was incorrect. It was masking off the low bits rather than the high bits. Also, while here, add more comments to `Memory`'s implementation.
diff --git a/lib/simplejit/src/memory.rs b/lib/simplejit/src/memory.rs index 1ea654e92..2158352cc 100644 --- a/lib/simplejit/src/memory.rs +++ b/lib/simplejit/src/memory.rs @@ -4,12 +4,19 @@ use errno; use libc; use region; +/// Round `size` up to the nearest multiple of `page_size`. +fn round_up_to_page_size(size:...
1
27
1
9c87f3ac8727b27cf28fba8b59048efdd9c3f068
Dan Gohman
2018-04-30T20:56:29
Fix some warnings in no_std builds. The dbg! macro expands to nothing in no_std mode, so variables that are only used for debugging prompt unused variable warnings. Also, allow unstable_features in no_std builds, since they use feature(alloc), which is an unstable feature.
diff --git a/lib/codegen/src/lib.rs b/lib/codegen/src/lib.rs index 8f60d23eb..faa21d24d 100644 --- a/lib/codegen/src/lib.rs +++ b/lib/codegen/src/lib.rs @@ -1,7 +1,8 @@ //! Cretonne code generation library. #![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)] -#![warn(unused_import_braces, unstable_f...
7
22
14
b7f38ac8bc16dcddf8c22c754abe064141683b8a
Dan Gohman
2018-04-30T20:45:57
Replace Builder's Vec<u8> with a Box<[u8]>. It doesn't need to dynamically grow, and `Box<[u8]>` is smaller.
diff --git a/lib/codegen/src/settings.rs b/lib/codegen/src/settings.rs index dbefb260c..f238cb601 100644 --- a/lib/codegen/src/settings.rs +++ b/lib/codegen/src/settings.rs @@ -24,7 +24,7 @@ use constant_hash::{probe, simple_hash}; use isa::TargetIsa; use std::fmt; use std::result; -use std::vec::Vec; +use std::boxe...
1
2
2
f4fe438baec2fb0a3ef1871846c46bd1dbd04975
Dan Gohman
2018-04-30T15:09:31
Suppress a warning about AsciiExt being deprecated. We currently support versions of Rust which need this import, so suppress the warning on versions of Rust which deprecated it.
diff --git a/lib/reader/src/lexer.rs b/lib/reader/src/lexer.rs index bad7a6369..f6d89881f 100644 --- a/lib/reader/src/lexer.rs +++ b/lib/reader/src/lexer.rs @@ -3,7 +3,7 @@ use cretonne_codegen::ir::types; use cretonne_codegen::ir::{Ebb, Value}; use error::Location; -#[allow(unused_imports)] +#[allow(unused_imports,...
1
1
1
afd544272282b8df9e553329bfdb771e119b38f3
pup
2018-04-30T20:26:21
Minor comment typo fix. (#315)
diff --git a/lib/codegen/src/timing.rs b/lib/codegen/src/timing.rs index 82653458c..017f3a466 100644 --- a/lib/codegen/src/timing.rs +++ b/lib/codegen/src/timing.rs @@ -122,7 +122,7 @@ mod details { /// Accumulated timing information for a single pass. #[derive(Default)] struct PassTime { - /// To...
1
1
1
c40a4ddc53d785424bb3cf2ea3be9b5ce01cb892
Dan Gohman
2018-04-27T12:38:53
Add functions to Module for initializing Contexts. This allows Module to assign the Context the TargetIsa's default calling convention.
diff --git a/lib/module/src/module.rs b/lib/module/src/module.rs index c4090404a..f3073f846 100644 --- a/lib/module/src/module.rs +++ b/lib/module/src/module.rs @@ -331,6 +331,25 @@ where } } + /// Create a new `Context` initialized for use with this `Module`. + /// + /// This ensures that the ...
1
19
0
8351ba3e3e69f840fbc1258e9effd43c8c59f036
Tyler McMullen
2018-04-24T03:24:02
Disassemble compiled binary for debugging (#308) * Use Capstone to disassemble and print code after compilation in cton-util. * Fix rustfmt errors
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index ded5a8e58..dc916f116 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -29,5 +29,6 @@ serde = "1.0.8" serde_derive = "1.0.8" tempdir = "0.3.5" term = "0.5.1" +capstone = "0.3.1" [workspace] diff --git a/cranelift/src/compile.rs b/craneli...
3
42
1
229b748f025bd3d6c23c99a9845b59d5a6137613
Dan Gohman
2018-04-23T21:06:54
Update to wasmparser 0.16.1.
diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml index 7c83cf9ed..5b48088a0 100644 --- a/lib/wasm/Cargo.toml +++ b/lib/wasm/Cargo.toml @@ -9,7 +9,7 @@ readme = "README.md" keywords = ["webassembly", "wasm"] [dependencies] -wasmparser = { version = "0.16.0", default-features = false } +wasmparser = { version =...
1
1
1
834df5290d2f4feb552bfc0359fd4b0c97f72b6c
Dan Gohman
2018-04-23T17:26:33
Add more comments to module.rs.
diff --git a/lib/module/src/module.rs b/lib/module/src/module.rs index b47189f1d..f275dea57 100644 --- a/lib/module/src/module.rs +++ b/lib/module/src/module.rs @@ -79,18 +79,23 @@ enum FuncOrDataId { Data(DataId), } +/// Information about a function which can be called. pub struct FunctionDeclaration { p...
1
11
0
0ef032cc41635bc6fe5705e800c7c8d69bc282f7
Dan Gohman
2018-04-23T17:14:32
Add more commonly-used names to the prelude.
diff --git a/lib/umbrella/src/lib.rs b/lib/umbrella/src/lib.rs index f28fb4554..cc1a3e169 100644 --- a/lib/umbrella/src/lib.rs +++ b/lib/umbrella/src/lib.rs @@ -26,10 +26,11 @@ pub mod prelude { pub use codegen; pub use codegen::entity::EntityRef; pub use codegen::ir::{AbiParam, InstBuilder, Value, Ebb, ...
1
3
2
56b3465ed0259948bd5816d51c1c6614c66800fd
Dan Gohman
2018-04-23T05:09:31
Use more lower-case letters for github URLs. This is a continuation of 362f8f13e2b8c7dd79b043c491479bb9fc6f69e9.
diff --git a/lib/faerie/Cargo.toml b/lib/faerie/Cargo.toml index db7b9c2f3..95a8fe3cc 100644 --- a/lib/faerie/Cargo.toml +++ b/lib/faerie/Cargo.toml @@ -17,4 +17,4 @@ failure = "0.1.1" [badges] maintenance = { status = "experimental" } -travis-ci = { repository = "Cretonne/cretonne" } +travis-ci = { repository = "c...
3
3
3
beddcc50f26dd0706ac2082739a55fdd0b9d63cd
Dan Gohman
2018-04-21T04:42:09
Minor code refactoring.
diff --git a/lib/codegen/src/legalizer/mod.rs b/lib/codegen/src/legalizer/mod.rs index 019b40c41..9be4975a0 100644 --- a/lib/codegen/src/legalizer/mod.rs +++ b/lib/codegen/src/legalizer/mod.rs @@ -32,6 +32,49 @@ use self::heap::expand_heap_addr; use self::call::expand_call; use self::libcall::expand_as_libcall; +//...
1
49
44
8a9e4b9cff642b586bbca759ce2d122f233a1457
Dan Gohman
2018-04-20T23:39:15
Update to faerie 0.2.0.
diff --git a/lib/faerie/Cargo.toml b/lib/faerie/Cargo.toml index 1914154f6..db7b9c2f3 100644 --- a/lib/faerie/Cargo.toml +++ b/lib/faerie/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" [dependencies] cretonne-codegen = { path = "../codegen", version = "0.5.1" } cretonne-module = { path = "../module", version = "0...
1
1
1
7079c72b28e3f2ef53cc046f2adbf82f14c270d8
Dan Gohman
2018-04-20T23:36:08
Add comments to DataContext's import_function and import_global_var. These are the main obvious place where ExternalName is exposed in the Module API, so add comments advising users that they can use Module to call these functions with the appropriate ExternalNames automatically.
diff --git a/lib/module/src/data_context.rs b/lib/module/src/data_context.rs index 51eac88b7..9e9f82338 100644 --- a/lib/module/src/data_context.rs +++ b/lib/module/src/data_context.rs @@ -104,6 +104,10 @@ impl DataContext { } /// Declare an external function import. + /// + /// Users of the `Module` ...
1
8
0
33e266eeeb149d0d06413af609fe824b27c3cf2b
Dan Gohman
2018-04-20T18:04:13
Fix missing word.
diff --git a/lib/codegen/Cargo.toml b/lib/codegen/Cargo.toml index 0c5a1104b..8304c50ca 100644 --- a/lib/codegen/Cargo.toml +++ b/lib/codegen/Cargo.toml @@ -26,7 +26,7 @@ optional = true [features] # The "std" feature enables use of libstd. The "core" feature enables use # of some minimal std-like replacement librar...
1
1
1
3e4531657c1514d296b210ff586453c4dd4c6d30
Dan Gohman
2018-04-20T00:49:48
Temporarily disable the shink_instruction pass. It appears some of the instruction encodings are incorrect. Temporarily disable the use of shorter encodings until these are fixed.
diff --git a/lib/codegen/src/context.rs b/lib/codegen/src/context.rs index 42fde1cc4..d9dcf7ba8 100644 --- a/lib/codegen/src/context.rs +++ b/lib/codegen/src/context.rs @@ -140,9 +140,12 @@ impl Context { } self.regalloc(isa)?; self.prologue_epilogue(isa)?; + // Temporarily disable the...
1
3
0
5434f4dafa58dda32c440b762f6e54322ae1ae76
Dan Gohman
2018-04-20T00:09:39
Update to raw_cpuid 3.1.0. This hopefully fixes MSVC build issues; see #302.
diff --git a/lib/native/Cargo.toml b/lib/native/Cargo.toml index 2909fa830..79fc6e7b6 100644 --- a/lib/native/Cargo.toml +++ b/lib/native/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" cretonne-codegen = { path = "../codegen", version = "0.5.1" } [target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.de...
1
1
1
fd8df67cfd9ba6faf9195659694f8ca1a1e14c48
Dan Gohman
2018-04-19T20:52:27
Convert an http link to https.
diff --git a/lib/filetests/Cargo.toml b/lib/filetests/Cargo.toml index 4e80bfc17..1a61c7c1e 100644 --- a/lib/filetests/Cargo.toml +++ b/lib/filetests/Cargo.toml @@ -4,7 +4,7 @@ authors = ["The Cretonne Project Developers"] version = "0.5.1" description = "Test driver and implementations of the filetest commands" lic...
1
1
1
c9a606da69bc9051c7b99e125f96091bb0a32a10
Dan Gohman
2018-04-19T20:44:07
Use more lower-case letters for github URLs. This is a continuation of 362f8f13e2b8c7dd79b043c491479bb9fc6f69e9.
diff --git a/lib/faerie/Cargo.toml b/lib/faerie/Cargo.toml index 77477b8f9..1914154f6 100644 --- a/lib/faerie/Cargo.toml +++ b/lib/faerie/Cargo.toml @@ -3,7 +3,7 @@ name = "cretonne-faerie" version = "0.5.1" authors = ["The Cretonne Project Developers"] description = "Emit Cretonne output to native object files with...
3
3
3
73c19bbf6da2d5009e93e17b04d16bec2fd4ecc8
Dan Gohman
2018-04-19T20:18:21
Fix the `dbg!` macro for `no_std` mode. Check for the `std` feature outside the macro body rather than inside, so that we get the `std` feature in `cretonne-codegen`, rather than in whatever crate the macro is being expanded in.
diff --git a/lib/codegen/src/dbg.rs b/lib/codegen/src/dbg.rs index a514dd7a0..8dd47f625 100644 --- a/lib/codegen/src/dbg.rs +++ b/lib/codegen/src/dbg.rs @@ -110,6 +110,7 @@ fn open_file() -> io::BufWriter<File> { /// Write a line to the debug trace file if tracing is enabled. /// /// Arguments are the same as for `p...
1
8
0
d72706c47845701d181491392466f3cd3a3fe197
Dan Gohman
2018-04-19T20:14:12
Use `use` declarations rather than '::std::...' names. This is what most of the rest of the codebase does, so this patch just tidies up a few additional places.
diff --git a/lib/codegen/src/bforest/map.rs b/lib/codegen/src/bforest/map.rs index b6a62ef41..7cfa824a4 100644 --- a/lib/codegen/src/bforest/map.rs +++ b/lib/codegen/src/bforest/map.rs @@ -3,6 +3,10 @@ use super::{Comparator, Forest, Node, NodeData, NodePool, Path, INNER_SIZE}; use packed_option::PackedOption; use s...
6
24
13
d9cd94f20de2ca891aec4e6eb0b232b85d836403
Dan Gohman
2018-04-19T19:19:21
Add settings::Configurable and isa to the prelude. These are useful for API users that customize the TargetIsa.
diff --git a/lib/umbrella/src/lib.rs b/lib/umbrella/src/lib.rs index f2a93ad23..de89cd578 100644 --- a/lib/umbrella/src/lib.rs +++ b/lib/umbrella/src/lib.rs @@ -30,6 +30,8 @@ pub mod prelude { pub use codegen::ir::types; pub use codegen::ir::condcodes::{IntCC, FloatCC}; pub use codegen::ir::immediates::{...
1
2
0
8e4511ed6c814e26a37a063df00be880f1d0ebc0
Dan Gohman
2018-04-19T18:46:49
Elaborate on the prelude. Rename the re-exported crates, so that prelude users can type "cretonne::codegen" rather than "cretonne::cretonne_codegen". And, add a few more useful items to the prelude.
diff --git a/lib/umbrella/src/lib.rs b/lib/umbrella/src/lib.rs index 179a33224..f2a93ad23 100644 --- a/lib/umbrella/src/lib.rs +++ b/lib/umbrella/src/lib.rs @@ -16,17 +16,20 @@ use_self, ))] -pub extern crate cretonne_codegen; -pub extern crate cretonne_frontend; +/// Provide these c...
1
11
8
cb37c25d3a3a8194c14fd67d30a1b27804bc4c92
Dan Gohman
2018-04-19T17:54:57
Introduce Builder and Product types to the Module workflow. This eliminates API confusion and surface area with respect to what state the `Backend` needs to be in at different points. Now, API users will construct a `Builder`, and pass it into the `Module` which uses it to constrct a `Backend`. The `Backend` instance...
diff --git a/lib/faerie/src/backend.rs b/lib/faerie/src/backend.rs index 37e94e29e..55af08829 100644 --- a/lib/faerie/src/backend.rs +++ b/lib/faerie/src/backend.rs @@ -11,19 +11,18 @@ use failure::Error; use std::fs::File; use target; -pub struct FaerieCompiledFunction {} - -pub struct FaerieCompiledData {} - -///...
6
159
75
5bc0e0e188dbb1f15018305f066dbe088d0f79ca
Dan Gohman
2018-04-19T16:40:46
Add a comment advertising `NullTrapSink`.
diff --git a/lib/codegen/src/binemit/memorysink.rs b/lib/codegen/src/binemit/memorysink.rs index 6871dc094..fa4aacc23 100644 --- a/lib/codegen/src/binemit/memorysink.rs +++ b/lib/codegen/src/binemit/memorysink.rs @@ -68,6 +68,9 @@ pub trait RelocSink { } /// A trait for receiving trap codes and offsets. +/// +/// I...
1
3
0
947177732a0d3d30638f38d6baa96da6808d4380
Dan Gohman
2018-04-19T03:59:42
Update to filecheck 0.3.0.
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index 021440c02..4961a6fef 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -23,7 +23,7 @@ cretonne-module = { path = "lib/module", version = "0.5.1" } cretonne-faerie = { path = "lib/faerie", version = "0.5.1" } cretonne-simplejit = { path = "li...
1
1
1
eefa1de4dac10d157bce58df0b0265f0709ba59f
Dan Gohman
2018-04-19T00:02:32
Rename some local variables for consistency with the rest of the codebase.
diff --git a/lib/codegen/src/regalloc/affinity.rs b/lib/codegen/src/regalloc/affinity.rs index d514cf4dd..a8fa42304 100644 --- a/lib/codegen/src/regalloc/affinity.rs +++ b/lib/codegen/src/regalloc/affinity.rs @@ -84,7 +84,7 @@ impl Affinity { /// /// Note that this does not guarantee that the register allocat...
2
12
13
c791a4f8b18c0190907d39dd9593f7454ebf5911
morenzg
2018-04-18T16:46:55
Update to wasmparser 0.16.0
diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml index ddf76afaf..b2ec94fa3 100644 --- a/lib/wasm/Cargo.toml +++ b/lib/wasm/Cargo.toml @@ -9,7 +9,7 @@ readme = "README.md" keywords = ["webassembly", "wasm"] [dependencies] -wasmparser = { git = "https://github.com/yurydelendik/wasmparser.rs", default_features ...
1
1
1
fdf34e9d3eb85050bcfe42fc010f36485c0a3818
morenzg
2018-04-18T01:07:22
Fix up nostd dependencies
diff --git a/lib/codegen/Cargo.toml b/lib/codegen/Cargo.toml index 63a156600..d362e0ee4 100644 --- a/lib/codegen/Cargo.toml +++ b/lib/codegen/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["compile", "compiler", "jit"] build = "build.rs" [dependencies] -cretonne-entity = { path = "../entity", version = "0.5.0" } +cretonn...
2
4
4
d7e13284b296e8e6c7310eba6d54da3cbf8ce757
Dan Gohman
2018-04-18T13:35:47
Mark `emit_to_memory` as unsafe, and introduce a safe `emit`. (#281) * Mark emit_to_memory as unsafe, and provide a safe compile_and_emit. Mark `Context::emit_to_memory` and `MemoryCodeSink::new` as unsafe, as `MemoryCodeSink` does not perform bounds checking when writing to memory. Add a `Context::compile_and...
diff --git a/cranelift/src/compile.rs b/cranelift/src/compile.rs index ae8cd1e30..4b9f77494 100644 --- a/cranelift/src/compile.rs +++ b/cranelift/src/compile.rs @@ -96,19 +96,18 @@ fn handle_module( for (func, _) in test_file.functions { let mut context = Context::new(); context.func = func; - ...
5
56
19
5c6cb202d8dbdfede47e3d1464ccbf0c09b38954
Dan Gohman
2018-04-17T23:02:10
Suppress cast_ptr_alignment clippy errors. These are only used in places that use `write_unaligned`, so it's ok that the pointer might be misaligned.
diff --git a/lib/codegen/src/binemit/memorysink.rs b/lib/codegen/src/binemit/memorysink.rs index 34380d246..d25513d27 100644 --- a/lib/codegen/src/binemit/memorysink.rs +++ b/lib/codegen/src/binemit/memorysink.rs @@ -84,6 +84,7 @@ impl<'a> CodeSink for MemoryCodeSink<'a> { fn put2(&mut self, x: u16) { u...
2
8
0
635d14c2516280829edaa2398dfd28ba61d749e4
Dan Gohman
2018-04-17T16:29:45
Rename GlobalVarData::VmCtx for consistency with ArgumentPurpose::VMContext.
diff --git a/lib/codegen/src/ir/globalvar.rs b/lib/codegen/src/ir/globalvar.rs index ad7549636..399f3b7ae 100644 --- a/lib/codegen/src/ir/globalvar.rs +++ b/lib/codegen/src/ir/globalvar.rs @@ -9,7 +9,7 @@ use std::fmt; pub enum GlobalVarData { /// Variable is part of the VM context struct, it's address is a const...
4
6
6
645fa3e858180a4a81140a8484e9d3925493a35f
Dan Gohman
2018-04-13T20:48:16
Minor code cleanup.
diff --git a/lib/cretonne/src/ir/function.rs b/lib/cretonne/src/ir/function.rs index 19baa16b2..f7dee1b91 100644 --- a/lib/cretonne/src/ir/function.rs +++ b/lib/cretonne/src/ir/function.rs @@ -179,9 +179,7 @@ impl Function { /// Wrapper around `DataFlowGraph::encode` which assigns `inst` the resulting encoding. ...
1
1
3
e2681a63034a508091f4970fba3d9837046abcfd
Dan Gohman
2018-04-03T22:48:14
Tidy up an unneeded `mut`.
diff --git a/lib/cretonne/src/preopt.rs b/lib/cretonne/src/preopt.rs index 0a1c13d6e..cbe7484fd 100644 --- a/lib/cretonne/src/preopt.rs +++ b/lib/cretonne/src/preopt.rs @@ -493,7 +493,7 @@ fn simplify(pos: &mut FuncCursor, inst: Inst) { } else if let ValueDef::Result(iconst_inst, _) = pos.func.dfg.value_de...
1
1
1
d7c66a8ec183fc16773ca66b6a308aeb2e9828e4
Dan Gohman
2018-03-27T19:22:02
Don't run the DCE pass when optimization is disabled. The main purpose of the DCE pass is to clean up dead code left behind by the optimizer, so it's not valuable to run it when the optimizer isn't being run.
diff --git a/lib/cretonne/src/context.rs b/lib/cretonne/src/context.rs index 2441f19d0..532424814 100644 --- a/lib/cretonne/src/context.rs +++ b/lib/cretonne/src/context.rs @@ -105,7 +105,9 @@ impl Context { } self.compute_domtree(); self.eliminate_unreachable_code(isa)?; - self.dce(is...
1
3
1
72b7a4b3efdfcf2cf87286347847447418bea80e
Dan Gohman
2018-03-30T18:33:44
Add `iter()` and `values()` functions to `PrimaryMap` and `EntityMap`. `iter()` iterates over both keys and values, while `values()` iterates over just values. Also add `_mut()` versions. These replace the otherwise common idiom of iterating with `keys()` and using indexing to get the values, allowing for simpler cod...
diff --git a/lib/cretonne/src/entity/iter.rs b/lib/cretonne/src/entity/iter.rs new file mode 100644 index 000000000..156021ee8 --- /dev/null +++ b/lib/cretonne/src/entity/iter.rs @@ -0,0 +1,109 @@ +//! A double-ended iterator over entity references and entities. + +use entity::EntityRef; +use std::marker::PhantomData; ...
11
274
43
5377092e5b851747fed03d385a666789664c509b
Dan Gohman
2018-03-29T00:15:19
Use `#[cold]` rather than `#[inline(never)]`. This gives optimizers more information about likely branch probabilities.
diff --git a/lib/cretonne/src/binemit/mod.rs b/lib/cretonne/src/binemit/mod.rs index 8f6f3c292..6d2099ceb 100644 --- a/lib/cretonne/src/binemit/mod.rs +++ b/lib/cretonne/src/binemit/mod.rs @@ -92,7 +92,7 @@ pub trait CodeSink { } /// Report a bad encoding error. -#[inline(never)] +#[cold] pub fn bad_encoding(func:...
1
1
1
4af95e37a60a84db3ee19a45688ff956905ca8a1
Dan Gohman
2018-03-28T23:22:05
Convert regular comments to documentation comments.
diff --git a/lib/cretonne/src/dominator_tree.rs b/lib/cretonne/src/dominator_tree.rs index 823469d08..57f55781a 100644 --- a/lib/cretonne/src/dominator_tree.rs +++ b/lib/cretonne/src/dominator_tree.rs @@ -11,28 +11,28 @@ use timing; use std::cmp::Ordering; use std::vec::Vec; -// RPO numbers are not first assigned i...
13
107
107
68b2040ba25f8b206c4af6fcf27662d83fc4beed
Dan Gohman
2018-03-28T23:20:46
Document that opcodes.rs contains `InstructionData`.
diff --git a/lib/cretonne/src/ir/instructions.rs b/lib/cretonne/src/ir/instructions.rs index bb09e2483..b25e5a069 100644 --- a/lib/cretonne/src/ir/instructions.rs +++ b/lib/cretonne/src/ir/instructions.rs @@ -31,6 +31,7 @@ pub type ValueListPool = entity::ListPool<Value>; // Include code generated by `lib/cretonne/met...
1
1
0
d566faa8fb1f626ef89eb351da3ec9a448c7736c
Dan Gohman
2018-03-28T23:16:35
Disable preopt at opt_level=fastest.
diff --git a/lib/cretonne/src/context.rs b/lib/cretonne/src/context.rs index fba2cd2cc..54fce4b84 100644 --- a/lib/cretonne/src/context.rs +++ b/lib/cretonne/src/context.rs @@ -88,7 +88,9 @@ impl Context { self.verify_if(isa)?; self.compute_cfg(); - self.preopt(isa)?; + if isa.flags()....
1
3
1
a297465c25f0e415061ad24f52cc6240a55248eb
Dan Gohman
2018-03-28T20:29:17
Tidy up comment formatting. Convert several normal comments to documentation comments, and make separator comments consistent with other files.
diff --git a/lib/cretonne/src/divconst_magic_numbers.rs b/lib/cretonne/src/divconst_magic_numbers.rs index f189e23d1..01b5066b2 100644 --- a/lib/cretonne/src/divconst_magic_numbers.rs +++ b/lib/cretonne/src/divconst_magic_numbers.rs @@ -1,17 +1,15 @@ //! Compute "magic numbers" for division-by-constants transformation...
3
29
40
592db1de7a2898be5fd3017db88378a0d427c327
Dan Gohman
2018-03-28T20:28:59
Tighten up the parser's verification of value aliases. This prevents uses of undefined values from passsing through unnoticed, and ensures that all aliases are ultimately resolved, regardless of where they are defined.
diff --git a/lib/cretonne/src/ir/dfg.rs b/lib/cretonne/src/ir/dfg.rs index d23606ee1..b8976b726 100644 --- a/lib/cretonne/src/ir/dfg.rs +++ b/lib/cretonne/src/ir/dfg.rs @@ -121,8 +121,9 @@ impl DataFlowGraph { /// Resolve value aliases. /// -/// Find the original SSA value that `value` aliases. -fn resolve_aliases(...
2
112
7
7b51edd2858db121f582db6475b0f89403e54942
Dan Gohman
2018-03-28T15:58:58
Fix spelling in a comment to be consistent with the code.
diff --git a/lib/cretonne/src/regalloc/coalescing.rs b/lib/cretonne/src/regalloc/coalescing.rs index 2437fd1a0..f23d55433 100644 --- a/lib/cretonne/src/regalloc/coalescing.rs +++ b/lib/cretonne/src/regalloc/coalescing.rs @@ -907,7 +907,7 @@ impl VirtualCopies { self.filter.clear(); } - /// Initialise...
1
1
1
7cce4be96a6021c38a50cfd26d285f69a8a7b99c
Dan Gohman
2018-03-28T04:11:24
Fix an incorrect index in "cton-util wasm -s".
diff --git a/cranelift/src/wasm.rs b/cranelift/src/wasm.rs index efd93df77..5f986ee5f 100644 --- a/cranelift/src/wasm.rs +++ b/cranelift/src/wasm.rs @@ -170,7 +170,7 @@ fn handle_module( println!( "Function #{} bytecode size: {} bytes", func_index, - ...
1
1
1
0b5bb313cb1c2f552141390ae8e7a649a56a957d
Dan Gohman
2018-03-27T21:12:06
Mark CondCode's functions #[must_use]. It's easy to forget whether they mutate the value in place or return a new value. Marking them #[must_use] will catch cases where they are used incorrectly.
diff --git a/lib/cretonne/src/ir/condcodes.rs b/lib/cretonne/src/ir/condcodes.rs index 11c438b10..61967a587 100644 --- a/lib/cretonne/src/ir/condcodes.rs +++ b/lib/cretonne/src/ir/condcodes.rs @@ -13,12 +13,14 @@ pub trait CondCode: Copy { /// /// The inverse condition code produces the opposite result for al...
1
2
0
3b0a9b9ecfdbf4a39806dbfc554826c3e3383c77
Dan Gohman
2018-03-27T04:58:46
Remove an unused argument.
diff --git a/lib/cretonne/src/context.rs b/lib/cretonne/src/context.rs index c6018dcd9..8358f2154 100644 --- a/lib/cretonne/src/context.rs +++ b/lib/cretonne/src/context.rs @@ -191,7 +191,7 @@ impl Context { /// Perform simple GVN on the function. pub fn simple_gvn<'a, FOI: Into<FlagsOrIsa<'a>>>(&mut self, ...
2
2
4
a661a8a9bb77cad40a8d86e224fd5089470aa3a3
Dan Gohman
2018-03-27T04:54:36
Factor out common ways to call `encode` from a dfg or func.
diff --git a/lib/cretonne/src/ir/dfg.rs b/lib/cretonne/src/ir/dfg.rs index 344483a6d..d23606ee1 100644 --- a/lib/cretonne/src/ir/dfg.rs +++ b/lib/cretonne/src/ir/dfg.rs @@ -1,7 +1,7 @@ //! Data flow graph tracking Instructions, Values, and EBBs. use entity::{PrimaryMap, EntityMap}; -use isa::TargetIsa; +use isa::{T...
4
18
13
14faef7374141fe619fc7ad600255fb181a94aa9
Dan Gohman
2018-03-26T15:18:32
Derive Debug for LiveValue.
diff --git a/lib/cretonne/src/regalloc/live_value_tracker.rs b/lib/cretonne/src/regalloc/live_value_tracker.rs index 5cb3a6f69..ee1f58944 100644 --- a/lib/cretonne/src/regalloc/live_value_tracker.rs +++ b/lib/cretonne/src/regalloc/live_value_tracker.rs @@ -32,6 +32,7 @@ pub struct LiveValueTracker { } /// Informati...
1
1
0
51eea8b89dd715763ccd65fc722c16f0be8ef1c0
Dan Gohman
2018-03-23T19:46:23
Add some comments noting unimplemented features. While use of these features will trigger an `unimplemented!()`, it is nice to let users know in advance about features which aren't yet implemented.
diff --git a/lib/cretonne/src/ir/heap.rs b/lib/cretonne/src/ir/heap.rs index 7920ec344..e2a5366a1 100644 --- a/lib/cretonne/src/ir/heap.rs +++ b/lib/cretonne/src/ir/heap.rs @@ -25,6 +25,8 @@ pub struct HeapData { #[derive(Clone)] pub enum HeapBase { /// The heap base lives in a reserved register. + /// + /...
2
4
0
aa73de8ca160426220de508d6901e05483770616
Dan Gohman
2018-03-23T10:46:42
Make code that tests for specific opcode families more consistent.
diff --git a/lib/cretonne/src/legalizer/mod.rs b/lib/cretonne/src/legalizer/mod.rs index 51198d05a..ae40c4258 100644 --- a/lib/cretonne/src/legalizer/mod.rs +++ b/lib/cretonne/src/legalizer/mod.rs @@ -56,19 +56,19 @@ pub fn legalize_function(func: &mut ir::Function, cfg: &mut ControlFlowGraph, is let opcod...
2
17
17
9602b78320be2ca588f710510d5b7805ec37530a
Dan Gohman
2018-03-22T23:55:18
Disable the LICM pass for now. There appear to be underlying problems with the way Cretonne handles value aliases, which are causing problems for LICM. Disable LICM until we have a chance to fix the underlying issues. Fixes #275.
diff --git a/lib/cretonne/src/context.rs b/lib/cretonne/src/context.rs index 5c2c884fd..c6018dcd9 100644 --- a/lib/cretonne/src/context.rs +++ b/lib/cretonne/src/context.rs @@ -92,8 +92,10 @@ impl Context { self.legalize(isa)?; if isa.flags().opt_level() == OptLevel::Best { self.compute_d...
1
2
0
af8ac8f8caa6a1b7b6fa070bd14d899e0f93d848
Dan Gohman
2018-03-21T00:37:09
Avoid calling `analyze_branch()` when the `BranchInfo` is not needed. It's faster to just call `opcode().is_branch()`.
diff --git a/lib/cretonne/src/regalloc/live_value_tracker.rs b/lib/cretonne/src/regalloc/live_value_tracker.rs index bedd0480e..5cb3a6f69 100644 --- a/lib/cretonne/src/regalloc/live_value_tracker.rs +++ b/lib/cretonne/src/regalloc/live_value_tracker.rs @@ -6,7 +6,6 @@ use dominator_tree::DominatorTree; use entity::...
1
2
4
2b3df1a506399e21dcdcc72bb835e66df7be3a74
Dan Gohman
2018-03-20T19:15:59
Add `use` declarations for `std` features. Merge the `use` parts of the `no_std` branch. This reduces the diffs between master and the `no_std` branch, making it easier to maintain. Most of these changes are derived from patches by @lachlansneff in https://github.com/Cretonne/cretonne/tree/no_std.
diff --git a/lib/cretonne/src/abi.rs b/lib/cretonne/src/abi.rs index 801d4bfe9..b69821e65 100644 --- a/lib/cretonne/src/abi.rs +++ b/lib/cretonne/src/abi.rs @@ -5,6 +5,7 @@ use ir::{ArgumentLoc, AbiParam, ArgumentExtension, Type}; use std::cmp::Ordering; +use std::vec::Vec; /// Legalization action to perform on ...
66
82
2
da4cf27780468b39f0983b65d074191263c8da4e
Dan Gohman
2018-03-20T19:04:17
Update to filecheck 0.3.0.
diff --git a/lib/filetests/Cargo.toml b/lib/filetests/Cargo.toml index 093b51b32..0e37c1ef8 100644 --- a/lib/filetests/Cargo.toml +++ b/lib/filetests/Cargo.toml @@ -14,5 +14,5 @@ name = "cton_filetests" [dependencies] cretonne = { path = "../cretonne", version = "0.4.1" } cretonne-reader = { path = "../reader", vers...
1
1
1
f6b8cf86a566969544762019e96a5238f3ae89a0
Dan Gohman
2018-03-13T14:04:38
Factor out br_if translation into helper functions.
diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index 10c0f7fdd..cccbae136 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -247,27 +247,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( state.popn(return_count); s...
1
32
21
c333a52e3e21dbbf1b6b87ef4991e9d8a309d561
Dan Gohman
2018-03-13T12:56:59
Factor out fcmp and icmp translation into helper functions.
diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index bb675cb1c..10c0f7fdd 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -765,101 +765,45 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( } /**************************** C...
1
36
72
d99b43e4b7aae1fde986c83055de99356981c363
Dan Gohman
2018-03-18T20:47:17
Add a hook to the wasm FuncEnvironment for emitting loop headers. This will allow wasm implementations that wish to insert code into every loop, for example to insert an interrupt check or a safepoint. do so without relying on asynchronous signals.
diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index aab015c53..bb675cb1c 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -137,6 +137,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( builder.ins().jump(loop_body, &[]); ...
2
9
0
492fa1283c4d5b10901623a2810d28d507a2f046
Dan Gohman
2018-03-18T20:46:07
Define an "interrupt" trap code. This is a trap code for interrupting the running code, to allow timeouts and safepoints to be implemented. It is resumable.
diff --git a/lib/cretonne/src/ir/trapcode.rs b/lib/cretonne/src/ir/trapcode.rs index 2374c206f..68b836f30 100644 --- a/lib/cretonne/src/ir/trapcode.rs +++ b/lib/cretonne/src/ir/trapcode.rs @@ -38,6 +38,10 @@ pub enum TrapCode { /// Failed float-to-int conversion. BadConversionToInteger, + /// Execution h...
1
6
0
832d9d9a0df56573e1ed53d73ea8c7d67aa34fb1
Dan Gohman
2018-03-18T20:45:41
Minor code simplification.
diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index 5535a1555..aab015c53 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -186,8 +186,8 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( } Operator::End => { le...
1
1
1
ed734f8ecb3504376b06e7ffb3fc5b5802ff9a1d
Dan Gohman
2018-03-16T23:34:20
Update to Cretonne 0.4.0.
diff --git a/Cargo.toml b/Cargo.toml index 7a3a56bee..79ef2f16c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,11 +17,11 @@ name = "wasm2obj" path = "src/wasm2obj.rs" [dependencies] -cretonne = "0.3.0" -cretonne-frontend = "0.3.0" -cretonne-reader = "0.3.0" -cretonne-wasm = "0.3.0" -cretonne-native = "0.3.0" +cret...
4
12
12
5e21ac1a307a088913fc83066cb27d0758b4ff8c
Dan Gohman
2018-03-16T23:01:15
Use whitespace more consistently in Cargo.toml files.
diff --git a/lib/cretonne/Cargo.toml b/lib/cretonne/Cargo.toml index adcaa28f7..96385da3e 100644 --- a/lib/cretonne/Cargo.toml +++ b/lib/cretonne/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" documentation = "https://cretonne.readthedocs.io/" repository = "https://github.com/Cretonne/cretonne" readme = "README.m...
2
2
2
a4c51d66a8f353368665498d248e842f9681124a
Dan Gohman
2018-03-12T21:06:15
Remove uses of `println!` in tests. In this case, it's a little nicer to just use more assertions, which will print their line number indicating how far the test got, when they fail. And this allows the tests to be run in no_std configurations.
diff --git a/lib/cretonne/src/divconst_magic_numbers.rs b/lib/cretonne/src/divconst_magic_numbers.rs index b046e2241..f189e23d1 100644 --- a/lib/cretonne/src/divconst_magic_numbers.rs +++ b/lib/cretonne/src/divconst_magic_numbers.rs @@ -480,56 +480,63 @@ mod tests { // don't panic with integer wraparounds, esp...
1
15
8
06fe3b654fb9adfdc8f00806e945e3fe75a3c1d3
Dan Gohman
2018-03-16T05:38:46
Avoid match expressions with reference patterns. https://github.com/rust-lang-nursery/rust-clippy/wiki#match_ref_pats
diff --git a/lib/cretonne/src/bforest/path.rs b/lib/cretonne/src/bforest/path.rs index 1add8f6e6..e52c8e897 100644 --- a/lib/cretonne/src/bforest/path.rs +++ b/lib/cretonne/src/bforest/path.rs @@ -55,8 +55,8 @@ impl<F: Forest> Path<F> { for level in 0.. { self.size = level + 1; self.n...
4
61
61
99f7cb5b8d0366ab848cf002061c1df2d8fc0a1e
Dan Gohman
2018-03-08T05:32:56
Use debug_assert_ne rather than debug_assert with a !=. https://github.com/rust-lang-nursery/rust-clippy/wiki#should_assert_eq
diff --git a/lib/cretonne/src/preopt.rs b/lib/cretonne/src/preopt.rs index 8e4bef8da..a232728ef 100644 --- a/lib/cretonne/src/preopt.rs +++ b/lib/cretonne/src/preopt.rs @@ -223,7 +223,7 @@ fn do_divrem_transformation(divrem_info: &DivRemByConstInfo, pos: &mut FuncCurso let t3 = pos.ins().iadd(t2, q1); ...
1
2
2
4dbafb45c7121686059dee66125911d7c0f2af21
Dan Gohman
2018-03-16T04:09:59
Update to num_cpus 1.8, and other updates.
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index b9acc0606..c7e9f6fef 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -24,7 +24,7 @@ docopt = "0.8.0" serde = "1.0.8" serde_derive = "1.0.8" tempdir = "0.3.5" -term = "0.5" +term = "0.5.1" [workspace] diff --git a/lib/filetests/Cargo....
2
3
3
9128290fb4fe73104b9a48e3986b28e0d6f8f0cb
Afnan Enayet
2018-03-14T17:48:06
Rename `ILBuilder` to `FunctionBuilderContext` (#268) * Rename `ILBuilder` to `FunctionBuilderContext` and update corresponding code * Refactor usages of ILBuilder to become FunctionBuilderContext, update variable names to reflect this change * Reformat to ensure that lines stay under 100 char limit * Apply...
diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index 6802884b6..de89698f1 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -13,13 +13,13 @@ use cretonne::packed_option::PackedOption; /// Structure used for translating a series of functions into Cretonne IL. ///...
4
65
64
44ca27beecc596a5eec2225ffa3cbcbd7e8d11c8
Dan Gohman
2018-03-12T23:11:14
Update to wasmparser 0.15.1.
diff --git a/lib/wasm/Cargo.toml b/lib/wasm/Cargo.toml index bc50b4a30..140ab69cf 100644 --- a/lib/wasm/Cargo.toml +++ b/lib/wasm/Cargo.toml @@ -12,7 +12,7 @@ keywords = [ "webassembly", "wasm" ] name = "cton_wasm" [dependencies] -wasmparser = "0.14.1" +wasmparser = "0.15.1" cretonne = { path = "../cretonne", vers...
1
1
1
e776d987fdae7e225892ab72026b3d31f6d5a06e
Dan Gohman
2018-03-12T23:07:13
Add Cargo.toml badges for published packages. This adds a basic travis badge, as well as a badge indicating "experimental" status, since the APIs are still evolving.
diff --git a/lib/cretonne/Cargo.toml b/lib/cretonne/Cargo.toml index 597ff1efd..adcaa28f7 100644 --- a/lib/cretonne/Cargo.toml +++ b/lib/cretonne/Cargo.toml @@ -18,3 +18,7 @@ name = "cretonne" # Please don't add any unless they are essential to the task of creating binary # machine code. Integration tests that need e...
5
20
0
aaf0def241e40b44badedf97b113be49bb00df9e
Dan Gohman
2018-03-12T21:09:34
Add lint overrides for unused `extern crate hashmap_core`. This allows these files to build with both the `no_std` and `std` features enabled at the same time.
diff --git a/lib/cretonne/src/lib.rs b/lib/cretonne/src/lib.rs index 9656f6d1e..29643d552 100644 --- a/lib/cretonne/src/lib.rs +++ b/lib/cretonne/src/lib.rs @@ -9,6 +9,7 @@ #![cfg_attr(not(feature = "std"), feature(alloc))] // Include the `hashmap_core` crate if no_std +#[allow(unused_extern_crates)] #[cfg(feature...
2
2
0
11eddafef8cea4ced9cc36a47bb511119320f8ff
Dan Gohman
2018-03-12T17:28:42
Avoid using floating-point values in expand_fcvt_to_sint. Compute the bound values for expand_fcvt_to_sint using bitwise integer arithmetic rather than floating-point arithmetic, to avoid relying on host floating point arithmetic.
diff --git a/lib/cretonne/src/ir/immediates.rs b/lib/cretonne/src/ir/immediates.rs index 2d3b1236e..69c9aab51 100644 --- a/lib/cretonne/src/ir/immediates.rs +++ b/lib/cretonne/src/ir/immediates.rs @@ -538,6 +538,17 @@ impl Ieee32 { Ieee32(exponent << t) } + /// Create an `Ieee32` number representing ...
2
53
4
f04e02c0a15850e141347d5d4e36ebedaa901b30
Dan Gohman
2018-03-12T17:28:39
Clarify comments about Conventional SSA form. Captialize "Conventional" so that it's clear that "Conventional SSA" is a specific concept being referenced.
diff --git a/lib/cretonne/src/regalloc/coalescing.rs b/lib/cretonne/src/regalloc/coalescing.rs index 10d0df2e6..3b9d6d03b 100644 --- a/lib/cretonne/src/regalloc/coalescing.rs +++ b/lib/cretonne/src/regalloc/coalescing.rs @@ -1,9 +1,9 @@ -//! Constructing conventional SSA form. +//! Constructing Conventional SSA form. ...
3
8
8
e81a27fb5d57cc2782bc442e33e87a6ceb9160cd
Dan Gohman
2018-03-12T17:28:32
Implement Debug for `ArgAction` and `Affinity`.
diff --git a/lib/cretonne/src/abi.rs b/lib/cretonne/src/abi.rs index 5c121824a..05c96c79d 100644 --- a/lib/cretonne/src/abi.rs +++ b/lib/cretonne/src/abi.rs @@ -11,7 +11,7 @@ use std::cmp::Ordering; /// /// An argument may go through a sequence of legalization steps before it reaches the final /// `Assign` action. -...
2
2
2
ad363d7e6be281782311f30e88d5c591f1830672
Dan Gohman
2018-03-12T17:28:25
Replace cretonne-wasm's Local with cretonne-frontend's Variable. Previously, cretonne-wasm used its own Local struct for identifying local variables. However, now that cretonne-frontend provides a Variable struct, just use that instead.
diff --git a/lib/frontend/src/variable.rs b/lib/frontend/src/variable.rs index 6b322e184..5b35a3426 100644 --- a/lib/frontend/src/variable.rs +++ b/lib/frontend/src/variable.rs @@ -12,6 +12,14 @@ use std::u32; #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub struct Variable(u32); +impl Variable { + /// Create a ...
4
28
38
1c72ccfe0ab8a6b83cc2a8946c68dad339436c61
Dan Gohman
2018-03-09T23:01:13
Define a `Variable` struct so that frontends don't have to. Frontends can still use their own types with `ILBuilder` and `FunctionBuilder`. This just provides a basic `Variable` struct for frontends that want it.
diff --git a/lib/frontend/src/frontend.rs b/lib/frontend/src/frontend.rs index fba2f89a0..6802884b6 100644 --- a/lib/frontend/src/frontend.rs +++ b/lib/frontend/src/frontend.rs @@ -15,6 +15,10 @@ use cretonne::packed_option::PackedOption; /// In order to reduce memory reallocations when compiling multiple functions, ...
4
61
75
56c7d857276b2d4d47e6112f444133aa9760f793
Dan Gohman
2018-03-09T22:31:12
More minor code simplifications.
diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index f08df8b0e..100dfbab4 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -282,10 +282,10 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( min_depth_frame.num_return_valu...
1
2
4
55d0efcb1495029fe96a808052e2da6626761537
Dan Gohman
2018-03-09T22:30:26
Pass the wasmparser::Operator by value, simplifying the code.
diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index 5d7e59f82..f08df8b0e 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -38,7 +38,7 @@ use std::{i32, u32}; /// Translates wasm operators into Cretonne IL instructions. Returns `true` if it inserted ...
2
6
6
40ec50d0b6036f6c97804e8d99b994a5d43e1ca1
Dan Gohman
2018-03-08T10:26:26
Don't relax a branch to have different input constraints. When relaxing a branch, restrict the set of candidate encodings to those which have the same input constraints as the original encoding choice. This prevents situations where relaxation prefers a non-REX-prefixed encoding over a REX prefixed one because the end...
diff --git a/lib/cretonne/src/binemit/relaxation.rs b/lib/cretonne/src/binemit/relaxation.rs index 94835b736..c6ea41f45 100644 --- a/lib/cretonne/src/binemit/relaxation.rs +++ b/lib/cretonne/src/binemit/relaxation.rs @@ -152,13 +152,23 @@ fn relax_branch( if let Some(enc) = isa.legal_encodings(dfg, &dfg[inst], ctr...
3
39
11
6cf9bf36b8c66ad4ea82245d2f3aaffd25dc1c7e
Dan Gohman
2018-03-08T10:26:15
Fix a typo in a comment.
diff --git a/lib/cretonne/src/isa/enc_tables.rs b/lib/cretonne/src/isa/enc_tables.rs index 5154138c1..7453b7c04 100644 --- a/lib/cretonne/src/isa/enc_tables.rs +++ b/lib/cretonne/src/isa/enc_tables.rs @@ -225,7 +225,7 @@ impl<'a> Encodings<'a> { self.legalize_actions[self.legalize as usize] } - /// C...
1
1
1
b1697dd1dc9e7479ee331603d76d04f4f93ea660
Dan Gohman
2018-03-05T22:34:35
Style: Don't use `else` after a `return`.
diff --git a/cranelift/src/filetest/binemit.rs b/cranelift/src/filetest/binemit.rs index d2d179fea..3c52a63b2 100644 --- a/cranelift/src/filetest/binemit.rs +++ b/cranelift/src/filetest/binemit.rs @@ -271,13 +271,12 @@ impl SubTest for TestBinEmit { "No encodings found for: {}", ...
1
2
3
1a4723831b6f5bc8e8a5dee33b530caa9b34a7c3
Dan Gohman
2018-03-05T22:02:45
Add an encoding step to "cton-util compile".
diff --git a/cranelift/src/compile.rs b/cranelift/src/compile.rs index fd2e5d555..9a9644b1c 100644 --- a/cranelift/src/compile.rs +++ b/cranelift/src/compile.rs @@ -6,9 +6,45 @@ use cton_reader::parse_test; use std::path::PathBuf; use cretonne::Context; use cretonne::settings::FlagsOrIsa; +use cretonne::{binemit, ir...
1
57
1
d2d02565fbf2d550a9cccf4fd1c8a844e6a400ed
Bruce Mitchener
2018-03-05T13:23:50
I64Extend16S should operate on 16 bits, not 8. This showed up in clippy warnings as the code for this case was the same as for `I64Extend8S`.
diff --git a/lib/wasm/src/code_translator.rs b/lib/wasm/src/code_translator.rs index 086646fa2..765b1a457 100644 --- a/lib/wasm/src/code_translator.rs +++ b/lib/wasm/src/code_translator.rs @@ -654,7 +654,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( } Operator::I64Extend16S => { ...
1
1
1
13b167770c112930604b6da18c4897f808d518bf
Dan Gohman
2018-03-03T21:21:10
Include emergency stack slots when laying out the stack. Emergency stack slots are a new kind of stack slot added relatively recently. They need to be allocated a stack offset just like explicit and spill slots. Also, make StackSlotData's offset field an Option, to catch problems like this in the future. Previously t...
diff --git a/cranelift/src/filetest/binemit.rs b/cranelift/src/filetest/binemit.rs index 550703f0b..d2d179fea 100644 --- a/cranelift/src/filetest/binemit.rs +++ b/cranelift/src/filetest/binemit.rs @@ -126,7 +126,7 @@ impl SubTest for TestBinEmit { // Fix the stack frame layout so we can test spill/fill encodin...
9
81
60
a301280d9456ffc1f3170b5038dbc192ec290ff0
Dan Gohman
2018-03-02T21:22:09
Change the stack alignment for 32-bit x86 to 16. Spiderwasm on 32-bit x86 always uses a 16-byte-aligned stack pointer. Change the setting for the "native" convention as well, for compatibility with Linux and Darwin ABIs, and so that if a platform has different ABI rules, the problem will be detected in code emitted b...
diff --git a/lib/cretonne/src/isa/intel/abi.rs b/lib/cretonne/src/isa/intel/abi.rs index cf3005836..c7dd1af93 100644 --- a/lib/cretonne/src/isa/intel/abi.rs +++ b/lib/cretonne/src/isa/intel/abi.rs @@ -180,11 +180,9 @@ pub fn spiderwasm_prologue_epilogue( func: &mut ir::Function, isa: &TargetIsa, ) -> result:...
1
7
10
aac006ed4933c230a99736f4ebb8afe4929677ca
Dan Gohman
2018-03-02T21:20:11
Avoid trivial numeric casts.
diff --git a/lib/cretonne/src/divconst_magic_numbers.rs b/lib/cretonne/src/divconst_magic_numbers.rs index 64416e48f..a34608359 100644 --- a/lib/cretonne/src/divconst_magic_numbers.rs +++ b/lib/cretonne/src/divconst_magic_numbers.rs @@ -498,14 +498,14 @@ mod tests { println!("Testing UP magicU64"); fo...
1
2
2
505fe9277af946cc683fcf856f3129148217f5e0
Dan Gohman
2018-03-01T14:43:16
Tidy up calls to `analyze_branch`.
diff --git a/lib/cretonne/src/dominator_tree.rs b/lib/cretonne/src/dominator_tree.rs index f7b727368..27caf338d 100644 --- a/lib/cretonne/src/dominator_tree.rs +++ b/lib/cretonne/src/dominator_tree.rs @@ -340,7 +340,7 @@ impl DominatorTree { /// post-order except for the insertion of the new EBB header at the spli...
7
8
8
162ca42b08c83403985389c1a267b6ef6a5df1b7
Bruce Mitchener
2018-03-05T03:52:19
Update term dep to 0.5
diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index d762d64d8..37b4456e8 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -24,7 +24,7 @@ serde = "1.0.8" serde_derive = "1.0.8" num_cpus = "1.5.1" tempdir="0.3.5" -term = "0.4.6" +term = "0.5" [workspace]
1
1
1
c93f29ad1e2d4b2228d788506f6d1d00d7c0b322
Dan Gohman
2018-02-28T21:30:37
Remove more obsolete comments about entity number remapping.
diff --git a/lib/reader/src/parser.rs b/lib/reader/src/parser.rs index b4252d4cb..47f14129a 100644 --- a/lib/reader/src/parser.rs +++ b/lib/reader/src/parser.rs @@ -82,9 +82,6 @@ pub struct Parser<'a> { } // Context for resolving references when parsing a single function. -// -// Many entities like values, stack sl...
1
10
14