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

Joerg Sonnenberger via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 12 06:30:53 PST 2015


On Wed, Nov 11, 2015 at 07:14:28PM -0800, Sean Silva via llvm-dev wrote:
> Can you show a real benchmark that users have tried to write where the call
> overhead of actually using an external function call is measurable?

This is the wrong question. The correct question is: What useful
benchmark cannot trivally factor out the overhead of the external
function call. Yes, if you do microbenchmarking it can be measurable.
But the point is that the overhead should be extremely predictable and
stable. As such, it can be easily calibrated and removed from the cost
of whatever you are really trying to measure. Given that the
instrumentation in general has some latency, you won't get around
calibration anyway.

Joerg


More information about the llvm-dev mailing list