* [4.2] PR ada/26797
@ 2007-03-01 15:49 Eric Botcazou
2007-03-04 10:10 ` Eric Botcazou
0 siblings, 1 reply; 2+ messages in thread
From: Eric Botcazou @ 2007-03-01 15:49 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 735 bytes --]
The VRP pass has been made more aggressive for 4.2, triggering the failures of
ACATS c35507m cd2a23e cxh1001 at -O2 on all platforms, and unfortunately we
haven't settled on the best approach to countering that yet. Therefore this
patch disables VRP by defaut for Ada (but -ftree-vrp of course still works).
Bootstrapped/regtested on i586-suse-linux, ACATS is now clean again at -O2.
OK for 4.2 branch?
2007-03-01 Eric Botcazou <ebotcazou@adacore.com>
PR ada/26797
* doc/invoked.texi (-O2): Document that Tree-VRP is not turned on
for the Ada compiler.
ada/
* lang.opt: Accept ftree-vrp for Ada.
* misc.c (OPT_ftree_vrp): New case.
(gnat_post_options): Disable Tree-VRP unless explicitly turned on.
--
Eric Botcazou
[-- Attachment #2: pr26797.diff --]
[-- Type: text/x-diff, Size: 1957 bytes --]
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi (revision 122253)
+++ doc/invoke.texi (working copy)
@@ -4539,6 +4539,10 @@ also turns on the following optimization
Please note the warning under @option{-fgcse} about
invoking @option{-O2} on programs that use computed gotos.
+@option{-O2} doesn't turn on @option{-ftree-vrp} for the Ada compiler.
+This option must be explicitly specified on the command line to be
+enabled for the Ada compiler.
+
@item -O3
@opindex O3
Optimize yet more. @option{-O3} turns on all optimizations specified by
Index: ada/lang.opt
===================================================================
--- ada/lang.opt (revision 122253)
+++ ada/lang.opt (working copy)
@@ -69,6 +69,11 @@ nostdlib
Ada
; Don't look for object files
+ftree-vrp
+Ada
+; Effect documented in common.opt - intercepted for Ada
+; to force the associated flag not to be set by default.
+
fRTS=
Ada Joined RejectNegative
; Selects the runtime
Index: ada/misc.c
===================================================================
--- ada/misc.c (revision 122425)
+++ ada/misc.c (working copy)
@@ -303,6 +303,12 @@ gnat_handle_option (size_t scode, const
gnat_argc++;
break;
+ case OPT_ftree_vrp:
+ /* We arrange for post_option to be able to set the corresponding
+ flag to 1 only when explicitly requested by the user. */
+ flag_tree_vrp = -value;
+ break;
+
case OPT_fRTS_:
gnat_argv[gnat_argc] = xstrdup ("-fRTS");
gnat_argc++;
@@ -368,6 +374,13 @@ gnat_post_options (const char **pfilenam
the TYPE_NONALIASED_COMPONENT and DECL_NONADDRESSABLE_P macros. */
flag_tree_salias = 0;
+ /* Disable Tree-VRP unless an explicit positive -f has been passed.
+ This forces the default to 0 for Ada. */
+ if (flag_tree_vrp < 0)
+ flag_tree_vrp = 1;
+ else
+ flag_tree_vrp = 0;
+
return false;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [4.2] PR ada/26797
2007-03-01 15:49 [4.2] PR ada/26797 Eric Botcazou
@ 2007-03-04 10:10 ` Eric Botcazou
0 siblings, 0 replies; 2+ messages in thread
From: Eric Botcazou @ 2007-03-04 10:10 UTC (permalink / raw)
To: gcc-patches
> OK for 4.2 branch?
>
>
> 2007-03-01 Eric Botcazou <ebotcazou@adacore.com>
>
> PR ada/26797
> * doc/invoked.texi (-O2): Document that Tree-VRP is not turned on
> for the Ada compiler.
> ada/
> * lang.opt: Accept ftree-vrp for Ada.
> * misc.c (OPT_ftree_vrp): New case.
> (gnat_post_options): Disable Tree-VRP unless explicitly turned on.
OK-ed on principle by Arno and installed on 4.2 branch after fixing the couple
of nits in the ChangeLog pointed out by Gerald.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-04 10:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-01 15:49 [4.2] PR ada/26797 Eric Botcazou
2007-03-04 10:10 ` Eric Botcazou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).