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

fix invalid double definition of irg_extblk_info_state

[r28060]
parent bde07a40
......@@ -31,13 +31,6 @@
#include "execfreq.h"
#include "begin.h"
/** Flags for extended basic block state. */
typedef enum {
ir_extblk_info_none = 0, /**< No extended basic block information is constructed. Default. */
ir_extblk_info_valid = 1, /**< Extended basic block information is valid. */
ir_extblk_info_invalid = 2 /**< Extended basic block information is constructed but invalid. */
} irg_extblk_info_state;
/* type of callback function for ir_graph walk */
#ifndef _EXTBB_WALK_FUNC_TYPEDEF_
#define _EXTBB_WALK_FUNC_TYPEDEF_
......
......@@ -336,11 +336,11 @@ FIRM_API void set_irg_outs_inconsistent(ir_graph *irg);
/** state: extended basic block state. */
typedef enum {
extblk_none = 0, /**< No extended basic block information is constructed. Default. */
extblk_valid = 1, /**< Extended basic block information is valid. */
extblk_invalid = 2 /**< Extended basic block information is constructed but invalid. */
} irg_extblk_state;
FIRM_API irg_extblk_state get_irg_extblk_state(const ir_graph *irg);
ir_extblk_info_none = 0, /**< No extended basic block information is constructed. Default. */
ir_extblk_info_valid = 1, /**< Extended basic block information is valid. */
ir_extblk_info_invalid = 2 /**< Extended basic block information is constructed but invalid. */
} irg_extblk_info_state;
FIRM_API irg_extblk_info_state get_irg_extblk_state(const ir_graph *irg);
FIRM_API void set_irg_extblk_inconsistent(ir_graph *irg);
/** state: dom_state
......
......@@ -233,7 +233,7 @@ static inline void rbitset_flip_all(unsigned *bitset, unsigned size)
*/
static inline bool rbitset_is_set(const unsigned *bitset, unsigned pos)
{
return BITSET_ELEM(bitset, pos) & (1 << (pos % BITS_PER_ELEM));
return (BITSET_ELEM(bitset, pos) & (1 << (pos % BITS_PER_ELEM))) != 0;
}
/**
......
......@@ -266,7 +266,7 @@ void compute_extbb(ir_graph *irg)
extbb->visited = 0;
}
irg->extblk_state = extblk_valid;
irg->extblk_state = ir_extblk_info_valid;
}
/* free all extended block info. */
......@@ -277,7 +277,7 @@ void free_extbb(ir_graph *irg)
xfree(irg->extbb_obst);
irg->extbb_obst = NULL;
}
irg->extblk_state = extblk_none;
irg->extblk_state = ir_extblk_info_none;
}
/* Return the extended block of a node. */
......
......@@ -243,5 +243,5 @@ void compute_extbb_execfreqs(ir_graph *irg, ir_exec_freq *execfreqs)
extbb->visited = 0;
}
irg->extblk_state = extblk_valid;
irg->extblk_state = ir_extblk_info_valid;
}
......@@ -2252,7 +2252,7 @@ static void dump_blocks_extbb_grouped(FILE *F, ir_graph *irg)
int i;
ir_entity *ent = get_irg_entity(irg);
if (get_irg_extblk_state(irg) != extblk_valid)
if (get_irg_extblk_state(irg) != ir_extblk_info_valid)
compute_extbb(irg);
construct_extblock_lists(irg);
......
......@@ -702,7 +702,7 @@ void (set_irg_outs_inconsistent)(ir_graph *irg)
_set_irg_outs_inconsistent(irg);
}
irg_extblk_state (get_irg_extblk_state)(const ir_graph *irg)
irg_extblk_info_state (get_irg_extblk_state)(const ir_graph *irg)
{
return _get_irg_extblk_state(irg);
}
......
......@@ -271,15 +271,15 @@ static inline void _set_irg_outs_inconsistent(ir_graph *irg)
irg->outs_state = outs_inconsistent;
}
static inline irg_extblk_state _get_irg_extblk_state(const ir_graph *irg)
static inline irg_extblk_info_state _get_irg_extblk_state(const ir_graph *irg)
{
return irg->extblk_state;
return irg->extblk_state;
}
static inline void _set_irg_extblk_inconsistent(ir_graph *irg)
{
if (irg->extblk_state == extblk_valid)
irg->extblk_state = extblk_invalid;
if (irg->extblk_state == ir_extblk_info_valid)
irg->extblk_state = ir_extblk_info_invalid;
}
static inline irg_dom_state _get_irg_dom_state(const ir_graph *irg)
......
Markdown is supported
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