This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix (?) load_kills_store


Zdenek Dvorak wrote:
considering description of load_kills_store, it seems to me that
arguments to true_dependence are passed in reversed order, which
could cause problems when one of the mems is unchanging (actually
switching the order seems to fix a misscompilation with my dce of
mems patch).

This looks over simplistic to me. Looking at the code in gcse.c, I see that both store_killed_before and store_killed_after end up here, so it isn't safe to assume that either mem comes first. Which comes first depends on whether we started in store_killed_before or store_killed_after. Also, despite the name, load_kills_store is used for both loads and stores, and clobbers too.


I think we need a more complicated fix, where we keep track of whether we are searching before or after the store. Also, we probably need to keep track of whether we have a read or a write, since strictly speaking we should be calling different routines, for different cases. It isn't clear if this is important though. I think keeping track of the before/after info is the main problem.

Jim





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]