[−][src]Struct c2rust_transpile::cfg::Cfg
A CFG graph of regular basic blocks.
Methods
impl<L: Clone + Ord + Hash, S1> Cfg<L, S1>
[src]
pub fn map_stmts<S2, F: Fn(&S1) -> S2>(&self, f: F) -> Cfg<L, S2>
[src]
Produce a copy of the current CFG, but transform all of the statements using the function provided.
impl Cfg<Label, StmtOrDecl>
[src]
A complete control-flow graph
pub fn from_stmts(
translator: &Translation,
ctx: ExprContext,
stmt_ids: &[CStmtId],
ret: ImplicitReturnType
) -> Result<(Self, DeclStmtStore), TranslationError>
[src]
translator: &Translation,
ctx: ExprContext,
stmt_ids: &[CStmtId],
ret: ImplicitReturnType
) -> Result<(Self, DeclStmtStore), TranslationError>
Completely process a statement into a control flow graph.
impl<Lbl: Copy + Ord + Hash + Debug, Stmt> Cfg<Lbl, Stmt>
[src]
The polymorphism here is only to make it clear exactly how little these functions need to know about the actual contents of the CFG - we only actual call these on one monomorphic CFG type.
pub fn prune_unreachable_blocks_mut(&mut self)
[src]
Removes blocks that cannot be reached from the CFG
pub fn prune_empty_blocks_mut(&mut self)
[src]
Removes empty blocks whose terminator is just a Jump
by merging them with the block they
are jumping to.
impl Cfg<Label, StmtOrDecl>
[src]
This impl block deals with pretty-printing control flow graphs into a format that dot
can
consume. Compiling these files into images means running something like:
dot -Tpng cfg_func.dot > cfg_func.png
pub fn dump_json_graph(
&self,
store: &DeclStmtStore,
file_path: String
) -> Result<()>
[src]
&self,
store: &DeclStmtStore,
file_path: String
) -> Result<()>
Write out a JSON representation of the control flow graph
pub fn dump_dot_graph(
&self,
ctx: &TypedAstContext,
store: &DeclStmtStore,
show_liveness: bool,
show_loops: bool,
file_path: String
) -> Result<()>
[src]
&self,
ctx: &TypedAstContext,
store: &DeclStmtStore,
show_liveness: bool,
show_loops: bool,
file_path: String
) -> Result<()>
Write out a .dot
representation of the control flow graph
Trait Implementations
impl<Lbl: Clone + Ord + Hash, Stmt: Clone> Clone for Cfg<Lbl, Stmt>
[src]
fn clone(&self) -> Cfg<Lbl, Stmt>
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<Lbl: Debug + Ord + Hash, Stmt: Debug> Debug for Cfg<Lbl, Stmt>
[src]
impl<L: Serialize + Ord + Hash, St: Serialize> Serialize for Cfg<L, St>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T> Erased for T
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Make for T
[src]
impl<T> MaybeResult for T
[src]
impl<'a, T> Captures for T where
T: ?Sized,
[src]
T: ?Sized,