[llvm] r270480 - tune lowering parameter for small apps (sjeng)

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 12:58:31 PDT 2016


Thanks! We'll keep an eye on the bot.

vedant

> On May 23, 2016, at 12:29 PM, Xinliang David Li via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> Author: davidxl
> Date: Mon May 23 14:29:26 2016
> New Revision: 270480
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=270480&view=rev
> Log:
> tune lowering parameter for small apps (sjeng)
> 
> Modified:
>    llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp
> 
> Modified: llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp?rev=270480&r1=270479&r2=270480&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp (original)
> +++ llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp Mon May 23 14:29:26 2016
> @@ -447,8 +447,9 @@ void InstrProfiling::emitVNodes() {
>   // the average number of counters per site is low. For small
>   // apps with very few sites, this may not be true. Bump up the
>   // number of counters in this case.
> -  if (NumCounters < 10)
> -    NumCounters *= 2;
> +#define INSTR_PROF_MIN_VAL_COUNTS 10
> +  if (NumCounters < INSTR_PROF_MIN_VAL_COUNTS)
> +    NumCounters = std::max(INSTR_PROF_MIN_VAL_COUNTS, (int) NumCounters * 2);
> 
>   auto &Ctx = M->getContext();
>   Type *VNodeTypes[] = {
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list