[PATCH] D115393: [InstrProf][NFC] Refactor Profile kind into a bitset enum.
Snehasish Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 8 14:41:20 PST 2021
snehasish added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/InstrProfReader.h:93
- virtual bool isIRLevelProfile() const = 0;
-
----------------
tejohnson wrote:
> It seems like these helper methods could still be defined using the new bitset, which would reduce some of the code churn?
My rationale for removing the helpers was
- to have only one way of checking the bits
- the checks are clustered together so users would get the bitset once rather than invoking multiple methods for each check
- extending the bitset would add now mean that adding more helpers?
- retaining the helpers doesn't obviate the need for getProfileKind since the simplified code in mergeProfileKind directly operates on the enum value
I agree retaining the helpers reduces code churn and I've made the changes to keep them. PTAL, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115393/new/
https://reviews.llvm.org/D115393
More information about the cfe-commits
mailing list