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]

[PATCH]: Fix unnecessary call clobbering due to type of global_var


Our fake global var used to represent call clobbering currently has type "size_type_node".

This puts it in the same alias set as various integer types.
This causes us to mark a lot of unnecessary things as call clobbered, simply because now may_alias_p (<whatever>, global_var) returns true for a lot of things it shouldn't, causing us to mark them as call clobbered.


Fixed by making global_var a void_type_node instead of a size_type_node

Bootstrapped and regtested on i686-pc-linux-gnu.

Diego, okay for mainline?

2004-12-05 Daniel Berlin <dberlin@dberlin.org>

	* tree-ssa-alias.c (create_global_var): Use void_type_node,
	not size_type_node.

Index: tree-ssa-alias.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-alias.c,v
retrieving revision 2.61
diff -u -p -r2.61 tree-ssa-alias.c
--- tree-ssa-alias.c	1 Dec 2004 23:53:17 -0000	2.61
+++ tree-ssa-alias.c	5 Dec 2004 19:11:59 -0000
@@ -2201,7 +2201,7 @@ static void
 create_global_var (void)
 {
   global_var = build_decl (VAR_DECL, get_identifier (".GLOBAL_VAR"),
-                           size_type_node);
+                           void_type_node);
   DECL_ARTIFICIAL (global_var) = 1;
   TREE_READONLY (global_var) = 0;
   DECL_EXTERNAL (global_var) = 1;


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