summaryrefslogtreecommitdiff
path: root/cil/src/ext/dominators.mli
diff options
context:
space:
mode:
Diffstat (limited to 'cil/src/ext/dominators.mli')
-rwxr-xr-xcil/src/ext/dominators.mli29
1 files changed, 29 insertions, 0 deletions
diff --git a/cil/src/ext/dominators.mli b/cil/src/ext/dominators.mli
new file mode 100755
index 0000000..0abf82e
--- /dev/null
+++ b/cil/src/ext/dominators.mli
@@ -0,0 +1,29 @@
+
+
+(** Compute dominators using data flow analysis *)
+(** Author: George Necula
+ 5/28/2004
+ **)
+
+(** Invoke on a code after filling in the CFG info and it computes the
+ * immediate dominator information. We map each statement to its immediate
+ * dominator (None for the start statement, and for the unreachable
+ * statements). *)
+val computeIDom: Cil.fundec -> Cil.stmt option Inthash.t
+
+
+(** This is like Inthash.find but gives an error if the information is
+ * Not_found *)
+val getIdom: Cil.stmt option Inthash.t -> Cil.stmt -> Cil.stmt option
+
+(** Check whether one statement dominates another. *)
+val dominates: Cil.stmt option Inthash.t -> Cil.stmt -> Cil.stmt -> bool
+
+
+(** Compute the start of the natural loops. This assumes that the "idom"
+ * field has been computed. For each start, keep a list of origin of a back
+ * edge. The loop consists of the loop start and all predecessors of the
+ * origins of back edges, up to and including the loop start *)
+val findNaturalLoops: Cil.fundec ->
+ Cil.stmt option Inthash.t ->
+ (Cil.stmt * Cil.stmt list) list