<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2012, 2013 David Malcolm <dmalcolm@redhat.com>
   Copyright 2012, 2013 Red Hat, Inc.

   This is free software: you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see
   <http://www.gnu.org/licenses/>.
-->
<api name="cfg">
  <doc>Control Flow Graphs</doc>

  <type name="cfg" varname="cfg" inner="struct control_flow_graph *">
    <doc>A control flow graph</doc>
    <attribute name="entry" kind="cfg_block">
      <doc>Entrypoint for this CFG</doc>
    </attribute>

    <attribute name="exit" kind="cfg_block">
      <doc>The final block within this CFG</doc>
    </attribute>

    <iterator name="block" kind="cfg_block"/>
  </type>

  <type name="cfg_block" varname="block" inner="basic_block">
    <attribute name="index" kind="int"/>
    <iterator  name="pred_edge" kind="cfg_edge"/>
    <iterator  name="succ_edge" kind="cfg_edge"/>
    <iterator  name="gimple_phi" kind="gimple_phi"/>
    <iterator  name="gimple"     kind="gimple"/>
    <iterator  name="rtl_insn"   kind="rtl_insn"/>
  </type>

  <type name="cfg_edge" varname="edge" inner="edge">
    <attribute name="src" kind="cfg_block"/>
    <attribute name="dest" kind="cfg_block"/>
    <attribute name="is_true_value" kind="bool"/>
    <attribute name="is_false_value" kind="bool"/>
    <attribute name="is_loop_exit" kind="bool"/>
    <attribute name="can_fallthru" kind="bool"/>
    <attribute name="is_complex" kind="bool"/>
    <attribute name="is_eh" kind="bool"/>
  </type>

</api>