[llvm] r248833 - InstrProf: Support for value profiling in the indexed profile format
Michael Spencer via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 16:46:22 PDT 2015
> /// 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.
- Michael Spencer
More information about the llvm-commits
mailing list