This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: possible gcse failure: not able to eliminate redundant loads
- From: "Sanjiv Kumar Gupta, Noida" <sanjivg at noida dot hcltech dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>, Dale Johannesen <dalej at apple dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 12 Dec 2002 10:40:38 +0530
- Subject: RE: possible gcse failure: not able to eliminate redundant loads
>> But surely it should be smart enough to know they don't alias?
>It depends on what it looks like at the RTL level.
the references of a[4] and a[1] appear as two pointer pseudos
which gcc can not determine that they have been computed with distinct
offsets from same base. Thus assumes aliasing.
I am implementing mod-k residue technique in GCC
(described in "alias analysis of executable code", Debray98 et. al)
to fix this.
>> This is still a bug, possibly an important one for performance.
>Store motion can't handle this right now.
>It was built to handle a certain special case.
>Improve it so it does more.
>It's not broken, just not as good as it could be.
Store motion is currently disabled. see gcse.c line 910
/* Store motion disabled until it is fixed. */
if (0 && !optimize_size && flag_gcse_sm)
store_motion ();
I don't know what's stopping this? I will try to find
related PRs and have a look into them.
--Sanjiv