This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50756] New: request to better handle non-constant distance vectors to avoid unnecessary alias check
- From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Oct 2011 09:54:40 +0000
- Subject: [Bug tree-optimization/50756] New: request to better handle non-constant distance vectors to avoid unnecessary alias check
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50756
Bug #: 50756
Summary: request to better handle non-constant distance vectors
to avoid unnecessary alias check
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: vincenzo.innocente@cern.ch
this is a follow up to PR50698
this snippet
void loop(float * x, int n) {
for (int i=0;i!=n; ++i)
x[i]=x[i+n]+x[i+2*n];
}
generates aliasing checks even if memory regions are clearly disjoint
(see analysis in comments 6 and 7 of PR50698)
I'm now experimenting with "structure of arrays" in place of "array of
structures" to make better use of vectorization (and cpu-caches). Reducing
unecessary aliasing will further improve performance (and reduce code size).It
will also avoid the need to set --param vect-max-version-for-alias-checks=100
or so.