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]

Fix for equivalent register handling


Reload has the ability to replace a pseudo with its equivalent memory location. This is fine and good.

Imagine:

1. We have a pseudo (call is pseudo A) with a read-only memory equivalent. Pseudo A does not get a hard reg

2. Pseudo A crosses a call (because the memory is readonly, we will not invalidate the equivalency)

3. The equivalent memory address references another pseudo (call it pseudo B)

4. Pseudo B does not cross calls and is assigned a call-clobbered hard reg.

5. reload replaces pseudo A with its equivalent memory form and in doing so lengthens the lifetime of pseudo B and causes pseudo B to be live across a call.

Obviously this is bad.

This patch removes the special case code which avoided invalidating certain memory equivalences for const/pure calls.

Bootstrapped and regression tested on x86_64; I also verified this fixed the testsuite regression seen with the range splitting code on x86_64.

Attachment: patch
Description: Text document


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