Commit d6822bc0 authored by Matthias Braun's avatar Matthias Braun
Browse files

remove nearly unused loop_flags

parent 77839c86
......@@ -39,7 +39,6 @@ void add_loop_son(ir_loop *loop, ir_loop *son)
assert(get_kind(son) == k_ir_loop);
lson.son = son;
ARR_APP1(loop_element, loop->children, lson);
loop->flags |= loop_outer_loop;
}
void add_loop_node(ir_loop *loop, ir_node *n)
......
......@@ -31,21 +31,6 @@
#include "irnode_t.h"
#include "irloop.h"
/**
* Possible loop flags, can be or'ed.
*/
typedef enum loop_flags {
loop_is_count_loop = 0x00000001, /**< if set it's a counting loop */
loop_downto_loop = 0x00000002, /**< if set, it's a downto loop, else an upto loop */
loop_is_endless = 0x00000004, /**< if set, this is an endless loop */
loop_is_dead = 0x00000008, /**< if set, it's a dead loop ie will never be entered */
loop_wrap_around = 0x00000010, /**< this loop is NOT endless, because of wrap around */
loop_end_false = 0x00000020, /**< this loop end can't be computed "from compute_loop_info.c" */
do_loop = 0x00000040, /**< this is a do loop */
once = 0x00000080, /**< this is a do loop, with a false condition. It iterate exactly once. */
loop_outer_loop = 0x00000100 /**< if set, this loop has child loops (is a no leaf). */
} loop_flags_t;
/**
* The loops data structure.
*
......@@ -62,7 +47,6 @@ typedef enum loop_flags {
struct ir_loop {
firm_kind kind; /**< A type tag, set to k_ir_loop. */
unsigned depth; /**< Nesting depth */
unsigned flags; /**< a set of loop_flags_t */
struct ir_loop *outer_loop; /**< The outer loop */
loop_element *children; /**< Mixed flexible array: Contains sons and loop_nodes */
ir_tarval *loop_iter_start; /**< counting loop: the start value */
......
......@@ -837,10 +837,14 @@ static void check_for_possible_endless_loops(ir_graph *irg)
{
assure_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_LOOPINFO);
ir_loop *root_loop = get_irg_loop(irg);
if (root_loop->flags & loop_outer_loop) {
ir_entity *ent = get_irg_entity(irg);
add_entity_additional_properties(ent, mtp_property_has_loop);
ir_loop *loop = get_irg_loop(irg);
for (size_t i = 0, n_elems = get_loop_n_elements(loop); i < n_elems; ++i) {
loop_element e = get_loop_element(loop, i);
if (*e.kind == k_ir_loop) {
ir_entity *ent = get_irg_entity(irg);
add_entity_additional_properties(ent, mtp_property_has_loop);
break;
}
}
confirm_irg_properties(irg, IR_GRAPH_PROPERTIES_ALL);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment