public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used
       [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
@ 2015-02-11 16:32 ` jamborm at gcc dot gnu.org
  2015-04-29  6:53 ` chrbr at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: jamborm at gcc dot gnu.org @ 2015-02-11 16:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-02-11
                 CC|                            |jamborm at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jamborm at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> ---
The problem is that in the testcase iinline-1.c as it is in the
testsuite, we use -fno-ipa-cp on the command line so that the
interprocedural phase of IPA-CP is not run so that it does not
interfere with the interprocedural stage of inlining, which however
uses information gathered by the function body analysis of ipa-prop
(which is invoked by both IPA-CP and inlining).  However, when we
inspect the function specific optimizations in ipa-prop at this stage,
we bail out if we see -fno-ipa-cp.

So yes, there is a clear inconsistency, but at the same time, having
the ability to switch off only the interprocedural part of IPA-CP is
extremely convenient for testing how the inliner uses jump functions
and other stuff gathered by ipa-prop.  I'll try to come up with some
fix.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used
       [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
  2015-02-11 16:32 ` [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used jamborm at gcc dot gnu.org
@ 2015-04-29  6:53 ` chrbr at gcc dot gnu.org
  2015-04-30  2:07 ` amker at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: chrbr at gcc dot gnu.org @ 2015-04-29  6:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #2 from chrbr at gcc dot gnu.org ---
Author: chrbr
Date: Wed Apr 29 06:52:23 2015
New Revision: 222559

URL: https://gcc.gnu.org/viewcvs?rev=222559&root=gcc&view=rev
Log:
2015-04-29  Christian Bruel  <christian.bruel@st.com>

        PR target/64835
        * config/i386/i386.c (ix86_default_align): New function.
        (ix86_override_options_after_change): Call ix86_default_align.
        (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): New hook.
        (ix86_override_options_after_change): New function.


Added:
    trunk/gcc/testsuite/gcc.dg/ipa/iinline-attr.c
    trunk/gcc/testsuite/gcc.target/i386/iinline-attr-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used
       [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
  2015-02-11 16:32 ` [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used jamborm at gcc dot gnu.org
  2015-04-29  6:53 ` chrbr at gcc dot gnu.org
@ 2015-04-30  2:07 ` amker at gcc dot gnu.org
  2015-04-30 13:49 ` chrbr at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: amker at gcc dot gnu.org @ 2015-04-30  2:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

amker at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amker at gcc dot gnu.org

--- Comment #3 from amker at gcc dot gnu.org ---
Hi,
The newly added test case failed on aarch64 as below:

FAIL: gcc.dg/ipa/iinline-attr.c scan-ipa-dump inline "hooray[^\\n]*inline copy
in test"

GCC is configured with below options:

/home/.../src/gcc/configure \
  --target=aarch64-none-elf \
  --prefix=/home/.../target-aarch64-none-elf.orig \
  --with-gmp=/home/.../build-aarch64-none-elf.orig/host-tools \
  --with-mpfr=/home/.../build-aarch64-none-elf.orig/host-tools \
  --with-mpc=/home/.../build-aarch64-none-elf.orig/host-tools \
  --with-cloog=/home/.../build-aarch64-none-elf.orig/host-tools \
  --with-isl=/home/.../build-aarch64-none-elf.orig/host-tools \
  --with-pkgversion=unknown \
  --disable-shared --disable-nls \
  --disable-threads --disable-tls \
  --enable-checking=yes \
  --enable-languages=c,c++ --with-newlib


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used
       [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2015-04-30  2:07 ` amker at gcc dot gnu.org
@ 2015-04-30 13:49 ` chrbr at gcc dot gnu.org
  2015-04-30 13:56 ` chrbr at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: chrbr at gcc dot gnu.org @ 2015-04-30 13:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #4 from chrbr at gcc dot gnu.org ---
yes, I thought that this test was target independent. tested on x86, arm, sh4.

I'll checking what happens with aarch64


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used
       [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2015-04-30 13:49 ` chrbr at gcc dot gnu.org
@ 2015-04-30 13:56 ` chrbr at gcc dot gnu.org
  2015-05-03  8:39 ` schwab@linux-m68k.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: chrbr at gcc dot gnu.org @ 2015-04-30 13:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #5 from chrbr at gcc dot gnu.org ---
(In reply to Martin Jambor from comment #1)
> The problem is that in the testcase iinline-1.c as it is in the
> testsuite, we use -fno-ipa-cp on the command line so that the
> interprocedural phase of IPA-CP is not run so that it does not
> interfere with the interprocedural stage of inlining, which however
> uses information gathered by the function body analysis of ipa-prop
> (which is invoked by both IPA-CP and inlining).  However, when we
> inspect the function specific optimizations in ipa-prop at this stage,
> we bail out if we see -fno-ipa-cp.
> 
> So yes, there is a clear inconsistency, but at the same time, having
> the ability to switch off only the interprocedural part of IPA-CP is
> extremely convenient for testing how the inliner uses jump functions
> and other stuff gathered by ipa-prop.  I'll try to come up with some
> fix.

Hi Martin,

back to fixing this problem, after the initial set of patch I think the
function

static bool
ipa_func_spec_opts_forbid_analysis_p (struct cgraph_node *node)
{
  tree fs_opts = DECL_FUNCTION_SPECIFIC_OPTIMIZATION (node->decl);

  if (!fs_opts)
    return false;
  return !opt_for_fn (node->decl, optimize) || !opt_for_fn (node->decl, 
flag_ipa_cp);
}

should always return false, and have a coherent analysis between global
optimizations and function specific optimizations, now that the ipa-inline
checks are fixed.

so testing this. seems to fix the testcase at first sight.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used
       [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2015-04-30 13:56 ` chrbr at gcc dot gnu.org
@ 2015-05-03  8:39 ` schwab@linux-m68k.org
  2015-05-04  9:09 ` chrbr at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: schwab@linux-m68k.org @ 2015-05-03  8:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #6 from Andreas Schwab <schwab@linux-m68k.org> ---
Also fails on ia64.

$ grep --color hooray iinline-attr.c.062i.inline
Analyzing function: hooray/0
Analyzing function body size: hooray
Inline summary for hooray/0 inlinable
    hooray/0 function not considered for inlining
Inline summary for hooray/0 inlinable
  not inlinable: hiphip.constprop/4 -> hooray/0, function not declared inline
and code size would grow
Enqueueing calls in hooray/0.
  not inlinable: hooray/0 -> non_existent/3, function body not available
    hooray/0 function not declared inline and code size would grow
Inline summary for hooray/0 inlinable
  Calls: hooray/0 (1.00 per call) non_existent/3 (1.00 per call)
  Called by: hiphip.constprop.0/4 (1.00 per call) hooray/0 (1.00 per call)
  References: hooray/0 (addr)
hooray/0 (hooray) @0x2000000000a80350
  hiphip (hooray);
hooray ()
;; Function hooray (hooray, funcdef_no=0, decl_uid=1465, cgraph_uid=0,
symbol_order=0)
hooray ()
  hooray ();


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used
       [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2015-05-03  8:39 ` schwab@linux-m68k.org
@ 2015-05-04  9:09 ` chrbr at gcc dot gnu.org
  2015-05-05 19:01 ` schwab@linux-m68k.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: chrbr at gcc dot gnu.org @ 2015-05-04  9:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #7 from chrbr at gcc dot gnu.org ---

aarch64: Seems to exhibit the same problem than x86:
override_options_after_change doesn't restore the align flags. 

ia64: will check, chances that this exhibits the same latent bug.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used
       [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2015-05-04  9:09 ` chrbr at gcc dot gnu.org
@ 2015-05-05 19:01 ` schwab@linux-m68k.org
  2015-05-15 14:34 ` ramana at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: schwab@linux-m68k.org @ 2015-05-05 19:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #8 from Andreas Schwab <schwab@linux-m68k.org> ---
Also fails on powerpc{-m32,-m64}.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used
       [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2015-05-05 19:01 ` schwab@linux-m68k.org
@ 2015-05-15 14:34 ` ramana at gcc dot gnu.org
  2024-05-15 12:08 ` ro at gcc dot gnu.org
  2024-05-15 16:16 ` ebotcazou at gcc dot gnu.org
  10 siblings, 0 replies; 11+ messages in thread
From: ramana at gcc dot gnu.org @ 2015-05-15 14:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835
Bug 64835 depends on bug 66015, which changed state.

Bug 66015 Summary: align directives not propagated after __attribute__ ((__optimize__ ("O2")))
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66015

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used
       [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2015-05-15 14:34 ` ramana at gcc dot gnu.org
@ 2024-05-15 12:08 ` ro at gcc dot gnu.org
  2024-05-15 16:16 ` ebotcazou at gcc dot gnu.org
  10 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2024-05-15 12:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu.org,
                   |                            |ro at gcc dot gnu.org

--- Comment #11 from Rainer Orth <ro at gcc dot gnu.org> ---
Eric,  gcc.dg/ipa/iinline-attr.c XPASSes on 64-bit SPARC since

commit ffabce849033e57ebaf60029822b81e981681c21
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Tue Nov 29 11:43:32 2022 +0100

    Couple of testsuite adjustments

    gcc/testsuite/
            * gcc.dg/ipa/iinline-attr.c: XFAIL on SPARC.

while the 32-bit test is XFAILed.  Should we restrict the xfail to 32-bit sparc
then?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used
       [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2024-05-15 12:08 ` ro at gcc dot gnu.org
@ 2024-05-15 16:16 ` ebotcazou at gcc dot gnu.org
  10 siblings, 0 replies; 11+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-05-15 16:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64835

--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Eric,  gcc.dg/ipa/iinline-attr.c XPASSes on 64-bit SPARC since
> 
> commit ffabce849033e57ebaf60029822b81e981681c21
> Author: Eric Botcazou <ebotcazou@adacore.com>
> Date:   Tue Nov 29 11:43:32 2022 +0100
> 
>     Couple of testsuite adjustments
>     
>     gcc/testsuite/
>             * gcc.dg/ipa/iinline-attr.c: XFAIL on SPARC.
> 
> while the 32-bit test is XFAILed.  Should we restrict the xfail to 32-bit
> sparc then?

The reason why it has been XFAILed does not depend on the word size though.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-05-15 16:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-64835-4@http.gcc.gnu.org/bugzilla/>
2015-02-11 16:32 ` [Bug target/64835] -fno-ipa-cp is inconsitently supported when attributes optimize or target are used jamborm at gcc dot gnu.org
2015-04-29  6:53 ` chrbr at gcc dot gnu.org
2015-04-30  2:07 ` amker at gcc dot gnu.org
2015-04-30 13:49 ` chrbr at gcc dot gnu.org
2015-04-30 13:56 ` chrbr at gcc dot gnu.org
2015-05-03  8:39 ` schwab@linux-m68k.org
2015-05-04  9:09 ` chrbr at gcc dot gnu.org
2015-05-05 19:01 ` schwab@linux-m68k.org
2015-05-15 14:34 ` ramana at gcc dot gnu.org
2024-05-15 12:08 ` ro at gcc dot gnu.org
2024-05-15 16:16 ` ebotcazou at gcc dot gnu.org

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).