Displaying 3 results from an estimated 3 matches for "addentrycount".
2017 Jun 30
2
llvm-profdata determinism
...e string hashes and in case of conflicts, the function
> content hash.
>
Ah, so you mean the loop in InstrProfRecordWriterTrait::EmitData that
inserts into the SummaryBuilder - the SummaryBuilder itself doesn't depend
on the order of 'addRecord' calls - ah, I see, addRecord -> addEntryCount
-> addCount -> CountFrequencies, a std::map (thus, ordered by value,
independent of call order of addRecord).
But inside that loop, it also starts writing directly to 'Out' based on the
order of the SmallDenseMap, doesn't it? I don't immediately see anywhere
that seeks within...
2017 Jun 30
0
llvm-profdata determinism
...of conflicts, the function
>> content hash.
>>
>
> Ah, so you mean the loop in InstrProfRecordWriterTrait::EmitData that
> inserts into the SummaryBuilder - the SummaryBuilder itself doesn't depend
> on the order of 'addRecord' calls - ah, I see, addRecord -> addEntryCount
> -> addCount -> CountFrequencies, a std::map (thus, ordered by value,
> independent of call order of addRecord).
>
> But inside that loop, it also starts writing directly to 'Out' based on
> the order of the SmallDenseMap, doesn't it? I don't immediately see
&g...
2017 Jun 30
2
llvm-profdata determinism
I haven't tested it, but it looks to me like llvm-profdata merge (well,
InstrProfWriter specifically) would not have deterministic output.
Certainly the textual output iterates over FunctionData which is a
StringMap of SmallDenseMaps, neither of which has deterministic iteration.
The binary writing looks like it'd have similar issues - looping through
these unordered maps & writing