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] |
As mentioned in the PR, when we create equivalences between a pseudo and read-only memory we run the risk of emitting an instruction which attempts to store into the read-only memory location. That is clearly bad since storing into a read-only memory location will typically generate a segfault. I pondered trying to remove the offending assignments, but came to the conclusion that it could not easily be done, largely because new offending assignments can emerge as a result of spilling. This patch takes the more conservative approach (and the same approach that was used for 3.3 and 3.4), namely ignoring equivalences for readonly memory locations. This can create more spills than is necessary, but it is clearly safe and this situation is quite rare, so the performance impact ought to be minimal. This has been bootstrapped and regression tested on i686-pc-linux-gnu. It has also been bootstrapped and regression tested in conjunction with the pending jump threading changes which exposed this latent bug.
Attachment:
PPP
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |