On Tue, 4 Jul 2017, Jan Hubicka wrote: > Hi, > this is another bug I noticed while looking into Itanium rgression. > There is no profile attached to recovery blocks in scheduler. > I made them very unlikely, but I wonder if we can do better? After all > we probably know the probability of path that will lead for speculation > to suceed?
I don't really understand why/how that would help (after all, when doing speculation we must have already decided that failure is very unlikely), but to answer the last question, scheduler's estimation of speculation success is tracked using the 'ds_t' data type - see comments regarding 'dw_t' and 'ds_t' in sched-int.h. I think in haifa-sched.c 'todo_spec' variable in create_check_block_twin holds the desired estimation, in sel-sched.c it's 'check_ds' in create_speculation_check. Alexander