[PATCH][IA64][PR35659] Fix data speculation

Maxim Kuvyrkov maxim@codesourcery.com
Sat Aug 2 18:05:00 GMT 2008


Hello,

Here is a simple for PR target/35659.  The problem is in speculatively 
scheduling predicated instruction and then recovering from unsuccessful 
data speculation.

When speculatively executing a predicated instruction, the predicate, 
which is calculated from wrong data provided by data-speculative load, 
is true.  Then, when recovering from unsuccessful data-speculation, the 
predicate is calculated to be false and the predicated instruction is 
not executed, thus not recovering from effect caused by unsuccessful 
data-speculation.

The patch forbids predicated instructions to be scheduled as part of 
data speculation.  This is a conservative fix, as it is legal to 
speculatively schedule predicated instructions whose arguments, but not 
predicate, are calculated from speculatively loaded data, but, at the 
moment, we don't track dependencies at that level of precision to say 
what part of consumer depends on a particular producer.

I didn't manage to extract a single-file testcase from the bug report, 
so there's none attached to the patch, sorry.

I don't have access to ia64 box at the moment, so I only checked it on a 
cross-compiler.  The fix is fairly simple and only makes scheduler to 
use data speculation less frequently.  Still, does anyone have a 
possibility to run tests on a cumulative patch of this and 2 other fixes 
for ia64 speculation I posted earlier today?

OK for trunk and 4.3 branch?


Thanks,

Maxim
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fsf-ia64-bugfixes-2.ChangeLog
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080802/2c809747/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fsf-ia64-bugfixes-2.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080802/2c809747/attachment-0001.ksh>


More information about the Gcc-patches mailing list