This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

DECL_CALL_CLOBBERED tweek


Hi,
this patch I am fully testing now on i686 makes the call clobbered issues go
away.  If this seems sensible, I would for sake of consistency replace
DECL_CALL_CLOBBERED with gimple_call_clobbered_var and
gimple_set_call_clobbered_var inlines in tree-flow-inline.h?

Honza
	* tree.h (DECL_CALL_CLOBBERED): Use variable annotation.
	(tree_decl_common): Remove call_clobbered_flag.
	* tree-flow.h (var_ann_d): Add call_clobbered flag.
Index: tree.h
===================================================================
*** tree.h	(revision 120083)
--- tree.h	(working copy)
*************** struct tree_memory_partition_tag GTY(())
*** 2611,2617 ****
     The result of this flag should always be the same as
     bitmap_bit_p (call_clobbered_vars, DECL_UID (decl)).  */
  #define DECL_CALL_CLOBBERED(DECL) \
!   DECL_COMMON_CHECK (DECL)->decl_common.call_clobbered_flag
  
  struct tree_decl_common GTY(())
  {
--- 2611,2617 ----
     The result of this flag should always be the same as
     bitmap_bit_p (call_clobbered_vars, DECL_UID (decl)).  */
  #define DECL_CALL_CLOBBERED(DECL) \
!   get_var_ann (DECL)->call_clobbered
  
  struct tree_decl_common GTY(())
  {
*************** struct tree_decl_common GTY(())
*** 2653,2659 ****
    /* Logically, these two would go in a theoretical base shared by var and
       parm decl. */
    unsigned gimple_reg_flag : 1;
-   unsigned call_clobbered_flag : 1;
  
    union tree_decl_u1 {
      /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
--- 2653,2658 ----
Index: tree-flow.h
===================================================================
*** tree-flow.h	(revision 120089)
--- tree-flow.h	(working copy)
*************** struct var_ann_d GTY(())
*** 251,256 ****
--- 251,259 ----
    /* True for HEAP and PARM_NOALIAS artificial variables.  */
    unsigned is_heapvar : 1;
  
+   /* True for call clobbered variables.  */
+   unsigned call_clobbered : 1;
+ 
    /* Memory partition tag assigned to this symbol.  */
    tree mpt;
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]