This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch to use alias analysis in stdarg functions
- To: <gcc-patches at gcc dot gnu dot org>
- Subject: Patch to use alias analysis in stdarg functions
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Sun, 19 Nov 2000 19:31:33 +0000 (GMT)
GCC doesn't use alias sets in stdarg functions to allow for non-ANSI-C
macros. Since GCC now uses builtins for stdarg/varargs rather than
messy macros, this should no longer apply, so the following patch
allows the use of alias sets in such functions. (Does anyone see any
reason why this should still not work with the builtin functions?)
Bootstrapped with no regressions on i686-pc-linux-gnu. OK to commit?
2000-11-19 Joseph S. Myers <jsm28@cam.ac.uk>
* alias.c (mems_in_disjoint_alias_sets_p): Do use alias sets in
stdarg and varargs functions.
--- alias.c.orig Tue Nov 7 22:40:50 2000
+++ alias.c Sun Nov 19 14:49:53 2000
@@ -226,15 +226,6 @@ mems_in_disjoint_alias_sets_p (mem1, mem
abort ();
#endif
- /* The code used in varargs macros are often not conforming ANSI C,
- which can trick the compiler into making incorrect aliasing
- assumptions in these functions. So, we don't use alias sets in
- such a function. FIXME: This should be moved into the front-end;
- it is a language-dependent notion, and there's no reason not to
- still use these checks to handle globals. */
- if (current_function_stdarg || current_function_varargs)
- return 0;
-
/* If have no alias set information for one of the MEMs, we have to assume
it can alias anything. */
if (MEM_ALIAS_SET (mem1) == 0 || MEM_ALIAS_SET (mem2) == 0)
--
Joseph S. Myers
jsm28@cam.ac.uk