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

Dmitri Gribenko via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 16 18:59:46 PST 2015


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.

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>*/


More information about the llvm-dev mailing list