[PATCH] D115393: [InstrProf][NFC] Refactor Profile kind into a bitset enum.
    Mircea Trofin via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jan 27 13:30:26 PST 2022
    
    
  
mtrofin added inline comments.
================
Comment at: llvm/include/llvm/ProfileData/InstrProfReader.h:495
 
+  InstrProfKind getProfileKind() const override {
+    InstrProfKind ProfileKind = InstrProfKind::Unknown;
----------------
This looks a lot like line 290, can it be refactored (or am I missing something?)
================
Comment at: llvm/lib/ProfileData/InstrProfWriter.cpp:337
   uint64_t CSSummarySize = 0;
-  if (ProfileKind == PF_IRLevelWithCS) {
+  if (static_cast<bool>(ProfileKind & InstrProfKind::CS)) {
     CSSummaryOffset = OS.tell();
----------------
consider adding helper APIs for test/set?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115393/new/
https://reviews.llvm.org/D115393
    
    
More information about the llvm-commits
mailing list