This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/34677] New: PREs insert_fake_stores is mostly useless
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jan 2008 16:18:57 -0000
- Subject: [Bug tree-optimization/34677] New: PREs insert_fake_stores is mostly useless
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Because it only handles stores through direct INDIRECT_REFs. So while we
handle
testcases like loadpre4.c:
int main(int *a, int argc)
{
int b;
int c;
int i;
int d, e;
for (i = 0; i < argc; i++)
{
e = *a;
*a = 9;
}
return d + e;
}
the much simpler
int a;
int foo(int argc)
{
int b;
int c;
int i;
int d, e;
for (i = 0; i < argc; i++)
{
e = a;
a = 9;
}
return d + e;
}
or the only slightly more complex
struct {
int a;
int large[100];
} x;
int foo(int argc)
{
int b;
int c;
int i;
int d, e;
for (i = 0; i < argc; i++)
{
e = x.a;
x.a = 9;
}
return d + e;
}
is not handled. If you disable insertion of fake stores completely, only
two loadpre tests fail in tree-ssa.exp. Did the new SCCVN obsolete some
cases where we needed the fake stores before but do not so now?
--
Summary: PREs insert_fake_stores is mostly useless
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34677