[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc
Subject: Re: Help on testsuite failures, only with optimization & bootstrap
From: "=?EUC-KR?B?U2VvbmdiYWUgUGFyayAoudq8urnoLCDa0+D328Yp?=" <seongbae.park () gmail ! com
Date: 2007-06-27 4:22:23
Message-ID: ab3a61990706262122j6bae830dw6919bdbc1b196d05 () mail ! gmail ! com
[Download RAW message or body]
On 6/26/07, Steve Ellcey <sje@cup.hp.com> wrote:
> After the dataflow merge (and after doing a couple of other patches that
> were needed just to boostrap GCC on IA64 HP-UX), I am still getting some
> failures in the GCC testsuite and am hoping for some advise / help on
> figuring out what is going on.
>
> A bunch of tests like the following one:
>
> void __attribute__ ((__noinline__)) foo (int xf) {}
> int main() { foo (1); return 0; }
>
> Are failing because the generate the following warning:
>
> $ obj_gcc/gcc/cc1 -quiet -O2 x.c
> x.c:2: warning: inline function 'foo' given attribute noinline
>
> Now, the problem here is, of course, that foo was no declared to be
> inline and the warning should not be happening. If I recompile the GCC
> file c-decl.c with -O2 -fno-tree-dominator-opts (instead of just -O2)
> then the resulting GCC will not generate the warning message. But so
> far I haven't been able to look at the tree dump files and see where
> things are going wrong. It doesn't help that the dominator pass gets
> run 3 times and I am not sure which one is causing the problem.
>
> Unfortunately, I am only seeing this on IA64 HP-UX. It does not happen
> on IA64 Linux.
>
> Does anyone have any advice / ideas / recommendations on how to debug
> this problem?
>
> Steve Ellcey
> sje@cup.hp.com
If you want to find out exactl which invocation of dominator pass
is causing the problem,
I recommend adding a new dbg_cnt, something like (untested):
diff -r d856dc0baad4 gcc/dbgcnt.def
--- a/gcc/dbgcnt.def Wed Jun 27 01:21:13 2007 +0000
+++ b/gcc/dbgcnt.def Tue Jun 26 21:17:55 2007 -0700
@@ -84,3 +84,5 @@ DEBUG_COUNTER (tail_call)
DEBUG_COUNTER (tail_call)
DEBUG_COUNTER (global_alloc_at_func)
DEBUG_COUNTER (global_alloc_at_reg)
+DEBUG_COUNTER (uncprop_at_func)
+DEBUG_COUNTER (dominator_at_func)
diff -r d856dc0baad4 gcc/tree-ssa-dom.c
--- a/gcc/tree-ssa-dom.c Wed Jun 27 01:21:13 2007 +0000
+++ b/gcc/tree-ssa-dom.c Tue Jun 26 21:18:26 2007 -0700
@@ -44,6 +44,7 @@ Boston, MA 02110-1301, USA. */
#include "tree-ssa-propagate.h"
#include "langhooks.h"
#include "params.h"
+#include "dbgcnt.h"
/* This file implements optimizations on the dominator tree. */
@@ -365,7 +366,7 @@ static bool
static bool
gate_dominator (void)
{
- return flag_tree_dom != 0;
+ return flag_tree_dom != 0 && dbg_cnt (dominator_at_func);
}
struct tree_opt_pass pass_dominator =
diff -r d856dc0baad4 gcc/tree-ssa-uncprop.c
--- a/gcc/tree-ssa-uncprop.c Wed Jun 27 01:21:13 2007 +0000
+++ b/gcc/tree-ssa-uncprop.c Tue Jun 26 21:18:35 2007 -0700
@@ -40,6 +40,7 @@ Boston, MA 02110-1301, USA. */
#include "tree-pass.h"
#include "tree-ssa-propagate.h"
#include "langhooks.h"
+#include "dbgcnt.h"
/* The basic structure describing an equivalency created by traversing
an edge. Traversing the edge effectively means that we can assume
@@ -604,7 +605,7 @@ static bool
static bool
gate_uncprop (void)
{
- return flag_tree_dom != 0;
+ return flag_tree_dom != 0 && dbg_cnt (uncprop_at_func);
}
struct tree_opt_pass pass_uncprop =
This will at least allow you to fairly quickly find which invocation of the pass
is causing the problem, by doing a binary search on "n"
by adding the following extra flag to the compilation line:
-fdbg-cnt=uncprop_at_func:n
or
-fdbg-cnt=dominator_at_func:n
Of course, once you narrowed it down to that level,
you'll most likely still need to narrow it down further
but you'll have a better chance (you may want to add
another more fine grained dbgcnt for that).
--
#pragma ident "Seongbae Park, compiler, http://seongbae.blogspot.com"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic