Add a branch relaxation pass for #72.

Compute exact EBB header offsets and check that branches are in range.

Not implemented yet: Relax branches that are not in range.

Invoke the relax_branches() pass from the 'test binemit' file tests so
they can verify the proper encoding of branch instructions too.
This commit is contained in:
Jakob Stoklund Olesen
2017-04-05 14:54:17 -07:00
parent 598c81c12e
commit 81251c3005
6 changed files with 224 additions and 42 deletions

View File

@@ -10,6 +10,9 @@ pub use write::write_function;
/// Version number of the cretonne crate.
pub const VERSION: &'static str = env!("CARGO_PKG_VERSION");
#[macro_use]
pub mod dbg;
pub mod binemit;
pub mod flowgraph;
pub mod dominator_tree;
@@ -22,9 +25,6 @@ pub mod settings;
pub mod sparse_map;
pub mod verifier;
#[macro_use]
pub mod dbg;
mod abi;
mod constant_hash;
mod context;