1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

tune lowering parameter for small apps (sjeng)

llvm-svn: 270480
This commit is contained in:
Xinliang David Li 2016-05-23 19:29:26 +00:00
parent 02d0a11d91
commit 57c7e1ac0c

View File

@ -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[] = {