public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/40914] New: ipa_analyze_call_uses fails to handle ptrmemfunc_vbit_in_delta
@ 2009-07-30 13:28 rearnsha at gcc dot gnu dot org
2009-07-31 9:38 ` [Bug tree-optimization/40914] " rguenth at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-07-30 13:28 UTC (permalink / raw)
To: gcc-bugs
The code in ipa_analyze_call_uses tries to wade through the gimple to identify
uses of pointers to member functions that are invariant after inlining (due to
parameter passing). However, the code only looks for the vbit test on the
pointer part of the pmf not on the delta. On targets such as ARM all bits in
the pointer are meaningful and the vbit is stored in the delta and the code
scrubbing fails to match.
Testcase is g++.dg/ipa/iinline-1.C
On arm the relevant gimple looks like:
f$__pfn_4 = f.__pfn;
f$__delta_24 = f.__delta;
__comp_ctor (&S, &"muhehehe"[0]);
D.1787_3 = f$__delta_24 & 1;
if (D.1787_3 != 0)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
D.1789_6 = f$__delta_24 >> 1;
D.1790_7 = (unsigned int) D.1789_6;
D.1791_8 = &S + D.1790_7;
D.1792_9 = (int (*__vtbl_ptr_type) (void) * *) D.1791_8;
D.1793_10 = *D.1792_9;
D.1795_12 = (unsigned int) f$__pfn_4;
D.1796_13 = D.1793_10 + D.1795_12;
D.1797_14 = *D.1796_13;
iftmp.0_15 = (String:: *) D.1797_14;
<bb 4>:
# iftmp.0_1 = PHI <iftmp.0_15(3), f$__pfn_4(2)>
D.1789_18 = f$__delta_24 >> 1;
D.1790_19 = (unsigned int) D.1789_18;
D.1798_20 = &S + D.1790_19;
D.1784_21 = iftmp.0_1 (D.1798_20, 4);
--
Summary: ipa_analyze_call_uses fails to handle
ptrmemfunc_vbit_in_delta
Product: gcc
Version: 4.4.2
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rearnsha at gcc dot gnu dot org
GCC target triplet: arm-eabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40914
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/40914] ipa_analyze_call_uses fails to handle ptrmemfunc_vbit_in_delta
2009-07-30 13:28 [Bug tree-optimization/40914] New: ipa_analyze_call_uses fails to handle ptrmemfunc_vbit_in_delta rearnsha at gcc dot gnu dot org
@ 2009-07-31 9:38 ` rguenth at gcc dot gnu dot org
2009-07-31 10:52 ` rearnsha at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-31 9:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-07-31 09:38 -------
Confirmed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-07-31 09:38:39
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40914
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/40914] ipa_analyze_call_uses fails to handle ptrmemfunc_vbit_in_delta
2009-07-30 13:28 [Bug tree-optimization/40914] New: ipa_analyze_call_uses fails to handle ptrmemfunc_vbit_in_delta rearnsha at gcc dot gnu dot org
2009-07-31 9:38 ` [Bug tree-optimization/40914] " rguenth at gcc dot gnu dot org
@ 2009-07-31 10:52 ` rearnsha at gcc dot gnu dot org
2009-07-31 21:56 ` rearnsha at gcc dot gnu dot org
2009-07-31 21:57 ` rearnsha at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-07-31 10:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rearnsha at gcc dot gnu dot org 2009-07-31 10:52 -------
Patch proposed here:
http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01816.html
--
rearnsha at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|enhancement |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40914
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/40914] ipa_analyze_call_uses fails to handle ptrmemfunc_vbit_in_delta
2009-07-30 13:28 [Bug tree-optimization/40914] New: ipa_analyze_call_uses fails to handle ptrmemfunc_vbit_in_delta rearnsha at gcc dot gnu dot org
2009-07-31 9:38 ` [Bug tree-optimization/40914] " rguenth at gcc dot gnu dot org
2009-07-31 10:52 ` rearnsha at gcc dot gnu dot org
@ 2009-07-31 21:56 ` rearnsha at gcc dot gnu dot org
2009-07-31 21:57 ` rearnsha at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-07-31 21:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rearnsha at gcc dot gnu dot org 2009-07-31 21:56 -------
Subject: Bug 40914
Author: rearnsha
Date: Fri Jul 31 21:56:28 2009
New Revision: 150319
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150319
Log:
PR tree-optimization/40914
* ipa-prop.c (ipa_get_ptr_load_param): New argument use_delta,
if set, then check the delta field of the PMF record.
(ipa_get_stmt_member_ptr_load_param): Propagate new param use_delta.
(ipa_analyze_call_uses): Handle machines where the vbit for a PMF
call is stored in the delta.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-prop.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40914
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/40914] ipa_analyze_call_uses fails to handle ptrmemfunc_vbit_in_delta
2009-07-30 13:28 [Bug tree-optimization/40914] New: ipa_analyze_call_uses fails to handle ptrmemfunc_vbit_in_delta rearnsha at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-07-31 21:56 ` rearnsha at gcc dot gnu dot org
@ 2009-07-31 21:57 ` rearnsha at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-07-31 21:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rearnsha at gcc dot gnu dot org 2009-07-31 21:57 -------
Fixed on trunk
--
rearnsha at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40914
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-31 21:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-30 13:28 [Bug tree-optimization/40914] New: ipa_analyze_call_uses fails to handle ptrmemfunc_vbit_in_delta rearnsha at gcc dot gnu dot org
2009-07-31 9:38 ` [Bug tree-optimization/40914] " rguenth at gcc dot gnu dot org
2009-07-31 10:52 ` rearnsha at gcc dot gnu dot org
2009-07-31 21:56 ` rearnsha at gcc dot gnu dot org
2009-07-31 21:57 ` rearnsha at gcc dot gnu dot 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).