Jan Hubicka - Re: [patch] Use guessed number of iterations in predict (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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] |
- From: Jan Hubicka
- To: Zdenek Dvorak
- Cc: gcc-patches at gcc dot gnu dot org, jh at suse dot cz
- Date: Sun, 25 Feb 2007 16:53:24 +0100
- Subject: Re: [patch] Use guessed number of iterations in predict
- References: <20070223120725.GA14633@atrey.karlin.mff.cuni.cz>
Hello,
guessed loop iterations 729 0.8% 92.61% / 92.72% 2837896526 4.5%
Nice, this was something I planed for a while...
*************** DEF_PREDICTOR (PRED_LOOP_ITERATIONS, "lo *** 62,67 **** --- 62,71 ---- DEF_PREDICTOR (PRED_BUILTIN_EXPECT, "__builtin_expect", PROB_VERY_LIKELY, PRED_FLAG_FIRST_MATCH)
- /* Use number of loop iterations guessed by the contents of the loop. */
- DEF_PREDICTOR (PRED_LOOP_ITERATIONS_GUESSED, "guessed loop iterations",
PROB_ALWAYS, 0)
I am not sure here, but perhaps PROP_FLAG_FIRST_MATCH would work better here? The reason is that code for combining predictions works poorly on predictors that actually predict precise outcome, not just the direction with some probability. In extreme case, consider case where loop can iterate at most 3 times, so probability is 33% that is very weak and can be outvoted by some other heuristic easilly...
Honza
- Follow-Ups:
- Re: [patch] Use guessed number of iterations in predict
* From: Zdenek Dvorak
- Re: [patch] Use guessed number of iterations in predict
- References:
- [patch] Use guessed number of iterations in predict
* From: Zdenek Dvorak
- [patch] Use guessed number of iterations in predict
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |