[PATCH] Make ir_type differentiate between cfgrtl and cfglayout mode

Roger Sayle roger@eyesopen.com
Wed Nov 1 19:04:00 GMT 2006

On Wed, 1 Nov 2006, Steven Bosscher wrote:
> 2006-11-01  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.

This is OK for mainline.  Thanks.   I agree that the ARM backend change
is trivial; but I'm sure someone will let us know if it isn't.

Hopefully, this is a short-term issue until all the RTL optimizers
can be standardized.  However, if any one decides to add more IR
states, we should probably switch to a bit-based approch where we
can easily test for "ir_type & RTL", rather than "!= GIMPLE".
However, I'm happy to let that someone else face this clean-up
when they come to it, as the current approach seems reasonable for


More information about the Gcc-patches mailing list