Re: Fix merging of value predictors

2024-01-19 Thread rep . dot . nop
On 17 January 2024 14:20:49 CET, Jan Hubicka wrote: >--- a/gcc/predict.def >+++ b/gcc/predict.def >@@ -94,6 +94,16 @@ DEF_PREDICTOR (PRED_LOOP_ITERATIONS_GUESSED, "guessed loop >iterations", > DEF_PREDICTOR (PRED_LOOP_ITERATIONS_MAX, "guessed loop iterations", > PROB_UNINITIALIZED,

Re: Fix merging of value predictors

2024-01-17 Thread Jan Hubicka
> > Please fill in what has changed, both for predict-18.c and predict.{cc,def} > changes. Sorry, I re-generated the patch after fixing some typos and forgot to copy over the changelog. > > > @@ -2613,24 +2658,40 @@ expr_expected_value_1 (tree type, tree op0, enum > > tree_code code, > >

Re: Fix merging of value predictors

2024-01-17 Thread Jakub Jelinek
On Wed, Jan 17, 2024 at 01:45:18PM +0100, Jan Hubicka wrote: > Hi, > expr_expected_value is doing some guesswork when it is merging two or more > independent value predictions either in PHI node or in binary operation. > Since we do not know how the predictions interact with each other, we can > no

Fix merging of value predictors

2024-01-17 Thread Jan Hubicka
Hi, expr_expected_value is doing some guesswork when it is merging two or more independent value predictions either in PHI node or in binary operation. Since we do not know how the predictions interact with each other, we can not really merge the values precisely. The previous logic merged the pre