119 #define SINGLE_EXIT_LOOP 1 123 #define UNKNOWN_LOOP 2 132 #define DOALL_LOOP 16 135 #define DO_WHILE_LOOP 32 138 #define COUNTABLE_LOOP 64 141 #define PIPELINABLE_LOOP 128 271 unsigned int GetId()
const;
300 alternative_entries.insert(v);
385 std::pair<vertex, vertex> vpair(vs, vd);
386 sp_back_edges.insert(vpair);
392 std::pair<vertex, vertex> vpair(vs, vd);
393 return sp_back_edges.find(vpair) != sp_back_edges.end();
Loop(const BBGraphRef g)
Constructor for empty loop (used for irreducible)
std::list< vertex > exits
exit blocks for this loop
void SetParent(LoopRef parent)
Sets parent for this loop.
vertex body_start
body start basic block (at the moment defined only for SIMPLE_LOOP & WHILE_LOOP)
bool close_interval
flag for induction variable close interval defined when loop_type is COUNTABLE_LOOP ...
long long instruction_size
loop instruction footprint
bool is_innermost_loop
tells if there aren't loop nested in this
std::map< vertex, CustomUnorderedSet< vertex > > exit_landing_association
Map storing the association between an exit basic block and the corresponding landing pads...
void AddChild(LoopRef child)
Adds a child loop.
long long footprint_size
loop memory footprint
refcount< Loop > parent_loop
Parent loop.
tree_nodeRef upper_bound_tn
Final value of induction variable.
const LoopRef Parent() const
returns the parent loop
REF_FORWARD_DECL(BBGraph)
void add_entry(vertex v)
add an entry of the loop
vertex primary_landing_pad() const
integer_cst_t lower_bound
Initial value of induction variable defined when loop_type is COUNTABLE_LOOP.
Class specification of the graph structures.
void add_block(vertex block)
adds a block to this loop
const BBGraphRef g
The basic block control flow graph.
const CustomUnorderedSet< vertex > & get_blocks() const
returns the blocks
CustomOrderedSet< LoopConstRef > children
Child loops.
std::list< vertex >::const_iterator exit_block_iter_end() const
CustomOrderedSet< vertex > alternative_entries
in case the loop is irreducible the loop has multiple entries while for reducible loops the entry is ...
redefinition of map to manage ordered/unordered structures
std::list< vertex >::const_iterator exit_block_iter_begin() const
A set of operation vertices.
Abstract pure class for the tree structure.
const CustomUnorderedSet< vertex > GetLandingPadBlocks() const
Return the landing pads of the loops.
CONSTREF_FORWARD_DECL(Loop)
tree_nodeRef init
value of the initialization of the induction variable
size_t num_blocks() const
returns the number of basic blocks belonging to this loop
CustomUnorderedSet< vertex > blocks
Blocks which belong to this loop.
OpVertexSet GetRecursivelyOps(const OpGraphConstRef op_graph) const
Returns the operation which belongs to this loop or to a nested loop.
Class used to describe a particular graph with basic blocks as nodes.
unsigned int inc_id
The node id containing the increment statement.
redefinition of set to manage ordered/unordered structures
unsigned int loop_id
the id of the loop
const std::map< vertex, CustomUnorderedSet< vertex > > & get_exit_landing_association() const
Returns the map exit_landing_association.
integer_cst_t upper_bound
Final value of induction variable defined when loop_type is COUNTABLE_LOOP.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
CustomOrderedSet< vertex > get_entries() const
return the alternative entries of a loop
void add_sp_back_edge(vertex vs, vertex vd)
add a spanning tree back edge
CustomUnorderedSet< vertex > landing_pads
landing_pads for this loop
tree_nodeRef increment_tn
Increment of induction variable.
This struct specifies the block node.
Template definition of refcount.
unsigned int init_gimple_id
The index of the gimple tree node containing the initialization of the induction variable; right oper...
unsigned int GetId() const
returns the loop id
void ComputeLandingPadExits()
compute landing pad exits
size_t num_landing_pads() const
bool is_sp_back_edge(vertex vs, vertex vd) const
check if a pair of vertex is a spanning tree back edge for the loop
bool is_innermost() const
tells if the loop is innermost
vertex GetHeader() const
returns loop header
CustomOrderedSet< std::pair< vertex, vertex > > sp_back_edges
set of vertex pairs describing a spanning tree back edge for the loop
CustomOrderedSet< std::pair< vertex, vertex > > get_sp_back_edges() const
return the list of spanning tree back edges
void get_recursively_bb(CustomUnorderedSet< vertex > &ret) const
Returns the basic blocks which belong to this loop and to loop nested in this loop.
static unsigned int curr_unused_irreducible_id
used to label irreducible loops
integer_cst_t increment
Increment of induction variable.
Class used to describe a particular graph with operations as nodes.
bool IsReducible() const
tells if the loop is reducible
vertex primary_landing_pad_block
???
const CustomOrderedSet< LoopConstRef > & GetChildren() const
Returns the children of this loop in the loop forest.
friend class add_loop_nop
Definition of friend class add_loop_nop.
unsigned int depth
Nesting depth of this loop.
unsigned int main_iv
the main induction variable of countable loop;
vertex header_block
the header of the loop