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]

Re: PATCH: Use edge probabilities in interblock and ebb schedulers


Vladimir Makarov wrote:
> Could you be more specific what is wrong with bb->frequency.
It is not consistant, i.e.

int f = 0;
FOR_EACH_EDGE (e, bb->preds) { f += EDGE_FREQUENCY (e); }
gcc_assert (bb->frequency == f);

will fail sometime.

In rare cases it can be greater than BB_FREQ_MAX. Some time ago I've tried to investigate the cause, that led to some CFG optimization (I think it is cfgcleanup.c: try_crossjump_to_edge (), but not sure).
>
> Even if you found wrong values of bb->frequency, it should be fixed in
> the first place not in just one place.
>
> So you should use bb->frequency in the patch even if their values are
> wrong and you can not fix them in the 1st place or you have no time for
> this.
The reason to keep frequencies in separate array is to calculate them independently for each ebb, so we won't end up with many zero frequencies in case of large CFGs.


BTW, it is not true that ammp shows +11% - it is 0%, actually. Sorry for this measurement fault.

--
Maxim


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