[PATCH][PR33133]: Fix bug in ia64 speculation support

Maxim Kuvyrkov maxim@codesourcery.com
Mon Sep 24 12:08:00 GMT 2007


Hi!

This patch fixes PR33133.

The scenario triggering the bug is the following:

1. Load instruction (ld1) with one last unresolved dependency on store 
(st) is converted to data speculative load and added to the ready list.

2. Store (st), in its turn, has a one last unresolved dependency on the 
bookkeeping copy of speculatively scheduled load (ld0).

3. Store (st) is speculative scheduled and a bookkeeping copy of it 
created in the recovery block for load (ld0).

4. All forward dependencies of store (including ld1) are made 
be_in_speculative to allow consumers of store (st) to be speculatively 
scheduled.

5. Because load (ld1) is trap_risky, its be_in_speculative dependency is 
forced to become hard.  Consequently, load (ld1) now has a hard 
dependency and is no longer ready for scheduling, which triggers a check 
in haifa-sched.c: try_ready () fail.


The proposed fix is to check if be_in_speculative dependency can be 
added to the insn before trying to do that.

OK for trunk?

Bootstrapped and regtested on ia64-linux-gnu (with c,c++ and fortran).


Thanks,

Maxim
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr33133.ChangeLog
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070924/cfa934be/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr33133.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070924/cfa934be/attachment-0001.ksh>


More information about the Gcc-patches mailing list