Commit Graph

27 Commits

Author SHA1 Message Date
Lachlan Sneff
3409af7c07 Add early-stage optimization crate (#556)
* Add simple constant folding and folding tests
2018-11-07 15:59:29 -08:00
Dan Gohman
9471c06da4 Update to use newer Rust features.
This re-introduces several cleanups that we previously deferred for not
supporting Rust 1.25.
2018-10-31 12:54:16 -07:00
Dan Gohman
7f90414ae1 Update no_std support. 2018-10-05 17:18:40 -07:00
Dan Gohman
53a0c6c67f Update to the rustfmt in rust 1.29, which is now stable. 2018-09-13 12:59:25 -07:00
Dan Gohman
51698f93f2 Merge branch 'master' into bforest 2018-08-13 15:55:31 -07:00
Dan Gohman
4769e67468 Fix a few declarations for the no_std build. 2018-08-13 12:52:43 -07:00
Dan Gohman
cc4bf1c7fb Deny unstable_features in "std" builds. 2018-08-13 12:51:49 -07:00
Benjamin Bouvier
a044f58cea Fixes #404: Use log.rs and a file-per-thread logger instead of the dbg! macro; 2018-08-13 12:51:14 -07:00
Amanieu d'Antras
ae3a3c368b Move bforest into a separate crate 2018-08-12 15:46:35 +02:00
Bruce Mitchener
76a7efc8db Clippy improvements (#408)
* clippy: Allow subsec_nanos usage for now.

The recommendation from clippy requires Rust 1.27, but we currently
support Rust 1.25 and later.

* Simplify ref pattern matches.

This was recommended by clippy.
2018-08-02 22:10:51 -07:00
bjorn3
01729be8d7 Add comment support (#379)
* Add comment support

* Don't print empty comments

* Add nop instruction

* Add test and note

* Add FuncWriter trait

* Remove comment support

* Add write_preamble to FuncWriter

* Fix test

* Some changes
2018-08-01 11:21:05 -07:00
Dan Gohman
15520fa961 Enable a few more clippy lints. 2018-07-26 10:10:36 -07:00
Lachlan Sneff
202e45c213 Fix broken build on no_std 2018-07-13 16:26:02 -07:00
Dan Gohman
f4dbd38a4c Rename Cretonne to Cranelift! 2018-07-13 09:15:16 -07:00
Dan Gohman
6971ae1c26 Export CodegenError and CodegenResult at the top level.
Make cretonne-codegen's `result` module private, and instead just export
`CodegenError` and `CodegenResult` at the top level of the
cretonne-codegen crate. This makes them more consistent with Result and
Error types in other cretonne crates.
2018-06-12 05:02:25 -07:00
Dan Gohman
f5c1273fcf Use cfg_attr to tidy up an extern crate declaration. 2018-06-07 11:34:55 -07:00
Dan Gohman
b2b20a95a1 Fix missing no_std support in cretonne-module.
And, tidy up the extern crate declarations in the std replacement modules.
2018-06-07 11:34:55 -07:00
Dan Gohman
4e67e08efd Use the target-lexicon crate.
This switches from a custom list of architectures to use the
target-lexicon crate.

 - "set is_64bit=1; isa x86" is replaced with "target x86_64", and
   similar for other architectures, and the `is_64bit` flag is removed
   entirely.

 - The `is_compressed` flag is removed too; it's no longer being used to
   control REX prefixes on x86-64, ARM and Thumb are separate
   architectures in target-lexicon, and we can figure out how to
   select RISC-V compressed encodings when we're ready.
2018-05-30 06:13:35 -07:00
Dan Gohman
a1fe0f82e1 Update to the latest stable rustfmt, 0.4.2-stable (febbb36 2018-04-12). 2018-05-29 10:37:38 -07:00
Dan Gohman
6b88cd44a8 Update to rustfmt-preview (#348)
* Update to rustfmt-preview.

* Run "cargo fmt --all" with rustfmt 0.4.1.

rustfmt 0.4.1 is the latest release of rustfmt-preview available on the
stable channel.

* Fix a long line that rustfmt 0.4.1 can't handle.

* Remove unneeded commas left behind by rustfmt.
2018-05-25 11:38:38 -07:00
Amanieu d'Antras
e9d362d902 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%
2018-05-18 15:40:08 -07:00
pup
b36fc6b75f Issue 311 - Add a pass to make NaN bits deterministic. (#322) 2018-05-09 15:11:58 -05:00
Dan Gohman
9c87f3ac87 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.
2018-04-30 14:04:14 -07:00
Dan Gohman
5f84afee2c Merge remote-tracking branch 'origin/master' into no_std 2018-04-18 17:20:02 -07:00
Dan Gohman
bf597b7abf Enable and fix several more clippy lints. 2018-04-17 17:05:03 -07:00
morenzg
a10a6a0df0 Merge branch 'master' into no_std 2018-04-17 16:56:33 -04:00
Dan Gohman
24fa169e1f Rename the 'cretonne' crate to 'cretonne-codegen'.
This fixes the next part of #287.
2018-04-17 09:46:56 -07:00