Browse Source

Rename the 'cfg' module to 'flowgraph'.

The 'cfg' name was easy to confuse with 'configuration'.
pull/3/head
Jakob Stoklund Olesen 8 years ago
parent
commit
f84e218a93
  1. 2
      lib/cretonne/src/context.rs
  2. 8
      lib/cretonne/src/dominator_tree.rs
  3. 0
      lib/cretonne/src/flowgraph.rs
  4. 2
      lib/cretonne/src/lib.rs
  5. 4
      lib/cretonne/src/regalloc/context.rs
  6. 4
      lib/cretonne/src/regalloc/liveness.rs
  7. 8
      lib/cretonne/src/verifier.rs
  8. 8
      src/filetest/domtree.rs
  9. 6
      src/print_cfg.rs
  10. 6
      tests/cfg_traversal.rs

2
lib/cretonne/src/context.rs

@ -9,8 +9,8 @@
//! contexts concurrently. Typically, you would have one context per compilation thread and only a
//! single ISA instance.
use cfg::ControlFlowGraph;
use dominator_tree::DominatorTree;
use flowgraph::ControlFlowGraph;
use ir::Function;
use isa::TargetIsa;
use legalize_function;

8
lib/cretonne/src/dominator_tree.rs

@ -1,8 +1,8 @@
//! 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 flowgraph::{ControlFlowGraph, BasicBlock};
use ir::{Ebb, Inst, Function, Layout, ProgramOrder};
use packed_option::PackedOption;
use std::cmp::Ordering;
@ -222,9 +222,9 @@ impl DominatorTree {
#[cfg(test)]
mod test {
use super::*;
use flowgraph::ControlFlowGraph;
use ir::{Function, InstBuilder, Cursor, types};
use cfg::ControlFlowGraph;
use super::*;
#[test]
fn empty() {

0
lib/cretonne/src/cfg.rs → lib/cretonne/src/flowgraph.rs

2
lib/cretonne/src/lib.rs

@ -10,7 +10,7 @@ pub use write::write_function;
/// Version number of the cretonne crate.
pub const VERSION: &'static str = env!("CARGO_PKG_VERSION");
pub mod cfg;
pub mod flowgraph;
pub mod dominator_tree;
pub mod entity_list;
pub mod entity_map;

4
lib/cretonne/src/regalloc/context.rs

@ -5,12 +5,12 @@
//! avoids allocating data structures independently for each function begin compiled.
use dominator_tree::DominatorTree;
use flowgraph::ControlFlowGraph;
use ir::Function;
use isa::TargetIsa;
use regalloc::coloring::Coloring;
use regalloc::live_value_tracker::LiveValueTracker;
use regalloc::liveness::Liveness;
use isa::TargetIsa;
use cfg::ControlFlowGraph;
/// Persistent memory allocations for register allocation.
pub struct Context {

4
lib/cretonne/src/regalloc/liveness.rs

@ -175,12 +175,12 @@
//!
//! There is some room for improvement.
use cfg::ControlFlowGraph;
use flowgraph::ControlFlowGraph;
use ir::dfg::ValueDef;
use ir::{Function, Value, Inst, Ebb};
use isa::{TargetIsa, RecipeConstraints};
use regalloc::liverange::LiveRange;
use regalloc::affinity::Affinity;
use regalloc::liverange::LiveRange;
use sparse_map::SparseMap;
/// A set of live ranges, indexed by value number.

8
lib/cretonne/src/verifier.rs

@ -53,11 +53,11 @@
//! - 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.
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 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::result;

8
src/filetest/domtree.rs

@ -11,14 +11,14 @@
//! We verify that the dominator tree annotations are complete and correct.
//!
use std::collections::HashMap;
use std::borrow::{Borrow, Cow};
use cretonne::dominator_tree::DominatorTree;
use cretonne::flowgraph::ControlFlowGraph;
use cretonne::ir::Function;
use cretonne::ir::entities::AnyEntity;
use cretonne::cfg::ControlFlowGraph;
use cretonne::dominator_tree::DominatorTree;
use cton_reader::TestCommand;
use filetest::subtest::{SubTest, Context, Result};
use std::borrow::{Borrow, Cow};
use std::collections::HashMap;
use utils::match_directive;
struct TestDomtree;

6
src/print_cfg.rs

@ -7,12 +7,12 @@ use std::borrow::Cow;
use std::fmt::{Result, Write, Display, Formatter};
use CommandResult;
use utils::read_to_string;
use filetest::subtest::{self, SubTest, Context, Result as STResult};
use cretonne::flowgraph::ControlFlowGraph;
use cretonne::ir::Function;
use cretonne::cfg::ControlFlowGraph;
use cretonne::ir::instructions::BranchInfo;
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 {
for (i, f) in files.into_iter().enumerate() {

6
tests/cfg_traversal.rs

@ -1,10 +1,10 @@
extern crate cretonne;
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::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>) {
let func = &parse_functions(function_source).unwrap()[0];

Loading…
Cancel
Save