module Cfg:sig
..end
preds
and succs
fields of Cil.stmt
This is required for several other extensions, such as Dataflow2
.
Consult the Plugin Development Guide for additional details.
val computeFileCFG : Cil_types.file -> unit
val clearFileCFG : ?clear_id:bool -> Cil_types.file -> unit
val cfgFun : Cil_types.fundec -> unit
val clearCFGinfo : ?clear_id:bool -> Cil_types.fundec -> unit
val printCfgChannel : Format.formatter -> Cil_types.fundec -> unit
val printCfgFilename : string -> Cil_types.fundec -> unit
val prepareCFG : ?keepSwitch:bool -> Cil_types.fundec -> unit
Cil.computeCFGInfo
. This function converts all Break
, Switch
,
Default
and Continue
Cil_types.stmtkind
s and Cil_types.label
s into If
s
and Goto
s, giving the function body a very CFG-like character. This
function modifies its argument in place.val computeCFGInfo : Cil_types.fundec -> bool -> unit
Break
, Switch
,
Default
, or Continue
Cil_types.stmtkind
s or Cil_types.label
s. Use
Cil.prepareCFG
to transform them away. The second argument should
be true
if you wish a global statement number, false
if you wish a
local (per-function) statement numbering. The list of statements is set
in the sallstmts field of a fundec.
NOTE: unless you want the simpler control-flow graph provided by
prepareCFG, or you need the function's smaxstmtid and sallstmt fields
filled in, we recommend you use Cfg.computeFileCFG
instead of this
function to compute control-flow information.
Cfg.computeFileCFG
is newer and will handle switch, break, and
continue correctly.
val clear_sid_info_ref : (unit -> unit) Pervasives.ref