Rename the 'cfg' module to 'flowgraph'.
The 'cfg' name was easy to confuse with 'configuration'.
This commit is contained in:
@@ -11,14 +11,14 @@
|
|||||||
//! We verify that the dominator tree annotations are complete and correct.
|
//! We verify that the dominator tree annotations are complete and correct.
|
||||||
//!
|
//!
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use cretonne::dominator_tree::DominatorTree;
|
||||||
use std::borrow::{Borrow, Cow};
|
use cretonne::flowgraph::ControlFlowGraph;
|
||||||
use cretonne::ir::Function;
|
use cretonne::ir::Function;
|
||||||
use cretonne::ir::entities::AnyEntity;
|
use cretonne::ir::entities::AnyEntity;
|
||||||
use cretonne::cfg::ControlFlowGraph;
|
|
||||||
use cretonne::dominator_tree::DominatorTree;
|
|
||||||
use cton_reader::TestCommand;
|
use cton_reader::TestCommand;
|
||||||
use filetest::subtest::{SubTest, Context, Result};
|
use filetest::subtest::{SubTest, Context, Result};
|
||||||
|
use std::borrow::{Borrow, Cow};
|
||||||
|
use std::collections::HashMap;
|
||||||
use utils::match_directive;
|
use utils::match_directive;
|
||||||
|
|
||||||
struct TestDomtree;
|
struct TestDomtree;
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ use std::borrow::Cow;
|
|||||||
use std::fmt::{Result, Write, Display, Formatter};
|
use std::fmt::{Result, Write, Display, Formatter};
|
||||||
|
|
||||||
use CommandResult;
|
use CommandResult;
|
||||||
use utils::read_to_string;
|
use cretonne::flowgraph::ControlFlowGraph;
|
||||||
use filetest::subtest::{self, SubTest, Context, Result as STResult};
|
|
||||||
use cretonne::ir::Function;
|
use cretonne::ir::Function;
|
||||||
use cretonne::cfg::ControlFlowGraph;
|
|
||||||
use cretonne::ir::instructions::BranchInfo;
|
use cretonne::ir::instructions::BranchInfo;
|
||||||
use cton_reader::{parse_functions, TestCommand};
|
use cton_reader::{parse_functions, TestCommand};
|
||||||
|
use filetest::subtest::{self, SubTest, Context, Result as STResult};
|
||||||
|
use utils::read_to_string;
|
||||||
|
|
||||||
pub fn run(files: Vec<String>) -> CommandResult {
|
pub fn run(files: Vec<String>) -> CommandResult {
|
||||||
for (i, f) in files.into_iter().enumerate() {
|
for (i, f) in files.into_iter().enumerate() {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
extern crate cretonne;
|
extern crate cretonne;
|
||||||
extern crate cton_reader;
|
extern crate cton_reader;
|
||||||
|
|
||||||
use self::cton_reader::parse_functions;
|
|
||||||
use self::cretonne::ir::Ebb;
|
|
||||||
use self::cretonne::cfg::ControlFlowGraph;
|
|
||||||
use self::cretonne::entity_map::EntityMap;
|
use self::cretonne::entity_map::EntityMap;
|
||||||
|
use self::cretonne::flowgraph::ControlFlowGraph;
|
||||||
|
use self::cretonne::ir::Ebb;
|
||||||
|
use self::cton_reader::parse_functions;
|
||||||
|
|
||||||
fn test_reverse_postorder_traversal(function_source: &str, ebb_order: Vec<u32>) {
|
fn test_reverse_postorder_traversal(function_source: &str, ebb_order: Vec<u32>) {
|
||||||
let func = &parse_functions(function_source).unwrap()[0];
|
let func = &parse_functions(function_source).unwrap()[0];
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
//! contexts concurrently. Typically, you would have one context per compilation thread and only a
|
//! contexts concurrently. Typically, you would have one context per compilation thread and only a
|
||||||
//! single ISA instance.
|
//! single ISA instance.
|
||||||
|
|
||||||
use cfg::ControlFlowGraph;
|
|
||||||
use dominator_tree::DominatorTree;
|
use dominator_tree::DominatorTree;
|
||||||
|
use flowgraph::ControlFlowGraph;
|
||||||
use ir::Function;
|
use ir::Function;
|
||||||
use isa::TargetIsa;
|
use isa::TargetIsa;
|
||||||
use legalize_function;
|
use legalize_function;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
//! A Dominator Tree represented as mappings of Ebbs to their immediate dominator.
|
//! A Dominator Tree represented as mappings of Ebbs to their immediate dominator.
|
||||||
|
|
||||||
use cfg::{ControlFlowGraph, BasicBlock};
|
|
||||||
use ir::{Ebb, Inst, Function, Layout, ProgramOrder};
|
|
||||||
use entity_map::EntityMap;
|
use entity_map::EntityMap;
|
||||||
|
use flowgraph::{ControlFlowGraph, BasicBlock};
|
||||||
|
use ir::{Ebb, Inst, Function, Layout, ProgramOrder};
|
||||||
use packed_option::PackedOption;
|
use packed_option::PackedOption;
|
||||||
|
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
@@ -222,9 +222,9 @@ impl DominatorTree {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use flowgraph::ControlFlowGraph;
|
||||||
use ir::{Function, InstBuilder, Cursor, types};
|
use ir::{Function, InstBuilder, Cursor, types};
|
||||||
use cfg::ControlFlowGraph;
|
use super::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn empty() {
|
fn empty() {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ pub use write::write_function;
|
|||||||
/// Version number of the cretonne crate.
|
/// Version number of the cretonne crate.
|
||||||
pub const VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
pub const VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub mod cfg;
|
pub mod flowgraph;
|
||||||
pub mod dominator_tree;
|
pub mod dominator_tree;
|
||||||
pub mod entity_list;
|
pub mod entity_list;
|
||||||
pub mod entity_map;
|
pub mod entity_map;
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
//! avoids allocating data structures independently for each function begin compiled.
|
//! avoids allocating data structures independently for each function begin compiled.
|
||||||
|
|
||||||
use dominator_tree::DominatorTree;
|
use dominator_tree::DominatorTree;
|
||||||
|
use flowgraph::ControlFlowGraph;
|
||||||
use ir::Function;
|
use ir::Function;
|
||||||
|
use isa::TargetIsa;
|
||||||
use regalloc::coloring::Coloring;
|
use regalloc::coloring::Coloring;
|
||||||
use regalloc::live_value_tracker::LiveValueTracker;
|
use regalloc::live_value_tracker::LiveValueTracker;
|
||||||
use regalloc::liveness::Liveness;
|
use regalloc::liveness::Liveness;
|
||||||
use isa::TargetIsa;
|
|
||||||
use cfg::ControlFlowGraph;
|
|
||||||
|
|
||||||
/// Persistent memory allocations for register allocation.
|
/// Persistent memory allocations for register allocation.
|
||||||
pub struct Context {
|
pub struct Context {
|
||||||
|
|||||||
@@ -175,12 +175,12 @@
|
|||||||
//!
|
//!
|
||||||
//! There is some room for improvement.
|
//! There is some room for improvement.
|
||||||
|
|
||||||
use cfg::ControlFlowGraph;
|
use flowgraph::ControlFlowGraph;
|
||||||
use ir::dfg::ValueDef;
|
use ir::dfg::ValueDef;
|
||||||
use ir::{Function, Value, Inst, Ebb};
|
use ir::{Function, Value, Inst, Ebb};
|
||||||
use isa::{TargetIsa, RecipeConstraints};
|
use isa::{TargetIsa, RecipeConstraints};
|
||||||
use regalloc::liverange::LiveRange;
|
|
||||||
use regalloc::affinity::Affinity;
|
use regalloc::affinity::Affinity;
|
||||||
|
use regalloc::liverange::LiveRange;
|
||||||
use sparse_map::SparseMap;
|
use sparse_map::SparseMap;
|
||||||
|
|
||||||
/// A set of live ranges, indexed by value number.
|
/// A set of live ranges, indexed by value number.
|
||||||
|
|||||||
@@ -53,11 +53,11 @@
|
|||||||
//! - Swizzle and shuffle instructions take a variable number of lane arguments. The number
|
//! - Swizzle and shuffle instructions take a variable number of lane arguments. The number
|
||||||
//! of arguments must match the destination type, and the lane indexes must be in range.
|
//! of arguments must match the destination type, and the lane indexes must be in range.
|
||||||
|
|
||||||
use ir::{types, Function, ValueDef, Ebb, Inst, SigRef, FuncRef, ValueList, JumpTable, Value};
|
|
||||||
use ir::instructions::{InstructionFormat, BranchInfo};
|
|
||||||
use ir::entities::AnyEntity;
|
|
||||||
use cfg::ControlFlowGraph;
|
|
||||||
use dominator_tree::DominatorTree;
|
use dominator_tree::DominatorTree;
|
||||||
|
use flowgraph::ControlFlowGraph;
|
||||||
|
use ir::entities::AnyEntity;
|
||||||
|
use ir::instructions::{InstructionFormat, BranchInfo};
|
||||||
|
use ir::{types, Function, ValueDef, Ebb, Inst, SigRef, FuncRef, ValueList, JumpTable, Value};
|
||||||
use std::fmt::{self, Display, Formatter};
|
use std::fmt::{self, Display, Formatter};
|
||||||
use std::result;
|
use std::result;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user