[llvm-dev] [RFC] A new intrinsic, `llvm.blackbox`, to explicitly prevent constprop, die, etc optimizations

Sean Silva via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 16 20:55:50 PST 2015


On Mon, Nov 16, 2015 at 6:59 PM, Dmitri Gribenko via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On Mon, Nov 16, 2015 at 10:03 AM, James Molloy via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > You don't appear to have addressed my suggestion to not require a perfect
> > external world, instead to measure the overhead of an imperfect world (by
> > using an empty benchmark) and subtracting that from the measured
> benchmark
> > score.
>
> In microbenchmarks, performance is not additive.  You can't compose
> two pieces of code and predict that the benchmark results will be the
> sum of the individual measurements.
>

This sounds like an argument against microbenchmarks in general, rather
than against James's point. James' point assumes that you are doing a
meaningful benchmark (since, presumably, you are trying to understand the
relative performance in your application).

-- Sean Silva


>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151116/e111c83c/attachment.html>


More information about the llvm-dev mailing list