[llvm] r248833 - InstrProf: Support for value profiling in the indexed profile format
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 17:50:11 PDT 2015
On Sep 29, 2015, at 16:46, Michael Spencer <bigcheesegs at gmail.com> wrote:
>> /// Profiling information for a single function.
>> struct InstrProfRecord {
>> InstrProfRecord() {}
>> @@ -52,6 +113,22 @@ struct InstrProfRecord {
>> StringRef Name;
>> uint64_t Hash;
>> std::vector<uint64_t> Counts;
>> + std::vector<InstrProfValueSiteRecord> IndirectCallSites;
>> +
>> + const std::vector<InstrProfValueSiteRecord> &
>> + getValueSitesForKind(uint32_t ValueKind) const {
>> + switch (ValueKind) {
>> + case IPVK_IndirectCallTarget:
>> + return IndirectCallSites;
>> + }
>> + llvm_unreachable("Unknown value kind!");
>> + }
>> +
>> + std::vector<InstrProfValueSiteRecord> &
>> + getValueSitesForKind(uint32_t ValueKind) {
>> + return const_cast<std::vector<InstrProfValueSiteRecord> &>(
>> + this->getValueSitesForKind(ValueKind));
>> + }
>> };
>
> This is infinitely recursive, and breaks the -Werror build
That should be fixed by r248859
> - Michael Spencer
More information about the llvm-commits
mailing list