[PATCH] Consider error-reporting calls cold in BPI

Renato Golin renato.golin at linaro.org
Wed Oct 30 15:37:02 PDT 2013


I'm not an expert in this area, but I can't see anything wrong with it.

Would be good to also have cerr support in there, but this is not important
for this patch, and with the new function, it could be implemented later.

cheers,
--renato


On 27 October 2013 16:23, Hal Finkel <hfinkel at anl.gov> wrote:

> Hello,
>
> BranchProbabilityInfo, which is used by the SDAG builder to assign branch
> weights, contains a number of well-known heuristics for statically
> predicting branch outcomes. One of these heuristics assigns low
> probabilities to paths post-dominated by cold calls (calls with the cold
> attribute). This patch enhances that heuristic to consider 'error
> reporting' calls to also be cold. An 'error reporting' call is a call to
> perror or a call to fprintf, fwrite, etc. where stderr is the stream.
>
> This is one of the suggested heuristics from:
> http://impact.crhc.illinois.edu/shared/papers/pact-98-branchpred.pdf
>
> I don't see any significant test-suite changes.
>
> Please review.
>
> Thanks again,
> Hal
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131030/4752c1b9/attachment.html>


More information about the llvm-commits mailing list