diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2006-11-03 22:12:37 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2006-11-03 22:12:37 +0000 |
commit | 52bca9998a939bde3fcc19ac1442b049e766233b (patch) | |
tree | b81f9de22e415ae2de2e244d323a481b46f0b6db /gcc/cfghooks.c | |
parent | 6c6aa1afedfc25ef15dda6692a617bd5c5358c9c (diff) | |
download | gcc-52bca9998a939bde3fcc19ac1442b049e766233b.tar.gz |
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
Diffstat (limited to 'gcc/cfghooks.c')
-rw-r--r-- | gcc/cfghooks.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index a4cc31c8b61..4d89aea8f5c 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -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. |