tree-dump.c (dump_enable_all): Rename local variable ir_type to avoid name conflicts.
* tree-dump.c (dump_enable_all): Rename local variable ir_type to avoid name conflicts. * cfgloopmanip.c (lv_adjust_loop_entry_edge): Check for IR_GIMPLE instead of using ir_type(). * profile.c (tree_register_profile_hooks): Likewise. * value-prof.c (tree_register_value_prof_hooks): Likewise. * basic-block.h (struct edge_def): Likewise. * config/arm/arm.c (legitimize_pic_address): Likewise. * coretypes.h (ir_type): New enum of all intermediate languages used in GCC. * cfghooks.c (ir_type): Rename to... (current_ir_type): ...this. Distinguish between cfgrtl and cfglayout mode when the current IR is RTL. Return enum ir_type. * cfghooks.h (ir_type): Replace with current_ir_type prototype. From-SVN: r118465
This commit is contained in:
parent
6c6aa1afed
commit
52bca9998a
@ -1,3 +1,20 @@
|
||||
2006-11-03 Steven Bosscher <steven@gcc.gnu.org>
|
||||
|
||||
* tree-dump.c (dump_enable_all): Rename local variable
|
||||
ir_type to avoid name conflicts.
|
||||
* cfgloopmanip.c (lv_adjust_loop_entry_edge): Check for IR_GIMPLE
|
||||
instead of using ir_type().
|
||||
* profile.c (tree_register_profile_hooks): Likewise.
|
||||
* value-prof.c (tree_register_value_prof_hooks): Likewise.
|
||||
* basic-block.h (struct edge_def): Likewise.
|
||||
* config/arm/arm.c (legitimize_pic_address): Likewise.
|
||||
* coretypes.h (ir_type): New enum of all intermediate languages
|
||||
used in GCC.
|
||||
* cfghooks.c (ir_type): Rename to...
|
||||
(current_ir_type): ...this. Distinguish between cfgrtl and
|
||||
cfglayout mode when the current IR is RTL. Return enum ir_type.
|
||||
* cfghooks.h (ir_type): Replace with current_ir_type prototype.
|
||||
|
||||
2006-11-03 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
gcc/
|
||||
|
@ -123,9 +123,9 @@ struct edge_def GTY(())
|
||||
|
||||
/* Instructions queued on the edge. */
|
||||
union edge_def_insns {
|
||||
rtx GTY ((tag ("0"))) r;
|
||||
tree GTY ((tag ("1"))) t;
|
||||
} GTY ((desc ("ir_type ()"))) insns;
|
||||
tree GTY ((tag ("true"))) t;
|
||||
rtx GTY ((tag ("false"))) r;
|
||||
} GTY ((desc ("current_ir_type () == IR_GIMPLE"))) insns;
|
||||
|
||||
/* Auxiliary info specific to a pass. */
|
||||
PTR GTY ((skip (""))) aux;
|
||||
|
@ -55,12 +55,19 @@ tree_register_cfg_hooks (void)
|
||||
cfg_hooks = &tree_cfg_hooks;
|
||||
}
|
||||
|
||||
/* Returns current ir type (rtl = 0, trees = 1). */
|
||||
/* Returns current ir type. */
|
||||
|
||||
int
|
||||
ir_type (void)
|
||||
enum ir_type
|
||||
current_ir_type (void)
|
||||
{
|
||||
return cfg_hooks == &tree_cfg_hooks ? 1 : 0;
|
||||
if (cfg_hooks == &tree_cfg_hooks)
|
||||
return IR_GIMPLE;
|
||||
else if (cfg_hooks == &rtl_cfg_hooks)
|
||||
return IR_RTL_CFGRTL;
|
||||
else if (cfg_hooks == &cfg_layout_rtl_cfg_hooks)
|
||||
return IR_RTL_CFGLAYOUT;
|
||||
else
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
||||
/* Verify the CFG consistency.
|
||||
|
@ -184,7 +184,7 @@ extern struct cfg_hooks rtl_cfg_hooks;
|
||||
extern struct cfg_hooks cfg_layout_rtl_cfg_hooks;
|
||||
|
||||
/* Declarations. */
|
||||
extern int ir_type (void);
|
||||
extern enum ir_type current_ir_type (void);
|
||||
extern void rtl_register_cfg_hooks (void);
|
||||
extern void cfg_layout_rtl_register_cfg_hooks (void);
|
||||
extern void tree_register_cfg_hooks (void);
|
||||
|
@ -1268,7 +1268,8 @@ lv_adjust_loop_entry_edge (basic_block first_head,
|
||||
cond_expr);
|
||||
|
||||
/* Don't set EDGE_TRUE_VALUE in RTL mode, as it's invalid there. */
|
||||
e1 = make_edge (new_head, first_head, ir_type () ? EDGE_TRUE_VALUE : 0);
|
||||
e1 = make_edge (new_head, first_head,
|
||||
current_ir_type () == IR_GIMPLE ? EDGE_TRUE_VALUE : 0);
|
||||
set_immediate_dominator (CDI_DOMINATORS, first_head, new_head);
|
||||
set_immediate_dominator (CDI_DOMINATORS, second_head, new_head);
|
||||
|
||||
|
@ -3230,7 +3230,7 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
|
||||
/* Play games to avoid marking the function as needing pic
|
||||
if we are being called as part of the cost-estimation
|
||||
process. */
|
||||
if (!ir_type())
|
||||
if (current_ir_type () != IR_GIMPLE)
|
||||
current_function_uses_pic_offset_table = 1;
|
||||
}
|
||||
else
|
||||
@ -3242,7 +3242,7 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg)
|
||||
/* Play games to avoid marking the function as needing pic
|
||||
if we are being called as part of the cost-estimation
|
||||
process. */
|
||||
if (!ir_type())
|
||||
if (current_ir_type () != IR_GIMPLE)
|
||||
{
|
||||
current_function_uses_pic_offset_table = 1;
|
||||
start_sequence ();
|
||||
|
@ -48,6 +48,13 @@ typedef union tree_node *tree;
|
||||
union section;
|
||||
typedef union section section;
|
||||
|
||||
/* The major intermediate representations of GCC. */
|
||||
enum ir_type {
|
||||
IR_GIMPLE,
|
||||
IR_RTL_CFGRTL,
|
||||
IR_RTL_CFGLAYOUT
|
||||
};
|
||||
|
||||
/* Provide forward struct declaration so that we don't have to include
|
||||
all of cpplib.h whenever a random prototype includes a pointer.
|
||||
Note that the cpp_reader typedef remains part of cpplib.h. */
|
||||
|
@ -1228,7 +1228,7 @@ end_branch_prob (void)
|
||||
void
|
||||
tree_register_profile_hooks (void)
|
||||
{
|
||||
gcc_assert (ir_type ());
|
||||
gcc_assert (current_ir_type () == IR_GIMPLE);
|
||||
profile_hooks = &tree_profile_hooks;
|
||||
}
|
||||
|
||||
|
@ -956,12 +956,12 @@ dump_end (enum tree_dump_index phase ATTRIBUTE_UNUSED, FILE *stream)
|
||||
static int
|
||||
dump_enable_all (int flags, int letter)
|
||||
{
|
||||
int ir_type = (flags & (TDF_TREE | TDF_RTL | TDF_IPA));
|
||||
int ir_dump_type = (flags & (TDF_TREE | TDF_RTL | TDF_IPA));
|
||||
int n = 0;
|
||||
size_t i;
|
||||
|
||||
for (i = TDI_none + 1; i < (size_t) TDI_end; i++)
|
||||
if ((dump_files[i].flags & ir_type)
|
||||
if ((dump_files[i].flags & ir_dump_type)
|
||||
&& (letter == 0 || letter == dump_files[i].letter))
|
||||
{
|
||||
dump_files[i].state = -1;
|
||||
@ -970,7 +970,7 @@ dump_enable_all (int flags, int letter)
|
||||
}
|
||||
|
||||
for (i = 0; i < extra_dump_files_in_use; i++)
|
||||
if ((extra_dump_files[i].flags & ir_type)
|
||||
if ((extra_dump_files[i].flags & ir_dump_type)
|
||||
&& (letter == 0 || letter == extra_dump_files[i].letter))
|
||||
{
|
||||
extra_dump_files[i].state = -1;
|
||||
|
@ -854,8 +854,8 @@ static struct value_prof_hooks tree_value_prof_hooks = {
|
||||
void
|
||||
tree_register_value_prof_hooks (void)
|
||||
{
|
||||
gcc_assert (current_ir_type () == IR_GIMPLE);
|
||||
value_prof_hooks = &tree_value_prof_hooks;
|
||||
gcc_assert (ir_type ());
|
||||
}
|
||||
|
||||
/* IR-independent entry points. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user