[PATCH] D69384: Add unlikely attribute to outlined function

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 14:51:00 PDT 2019


hiraditya added a comment.

btw, I had this patch in mind:

  diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
  index 5edc696c29a..60726320cf1 100644
  --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
  +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
  @@ -434,11 +434,11 @@ bool CodeGenPrepare::runOnFunction(Function &F) {
     ProfileSummaryInfo *PSI =
         &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI();
   
  -  if (!PSI->hasProfileSummary()) {
  +  if (!PSI->hasProfileSummary()) {
       auto EC = F.getEntryCount();
       if (EC.hasValue() && (F.getEntryCount().getCount() == 0))
         F.setSectionPrefix(".unlikely");
  -  }
  +  }


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69384/new/

https://reviews.llvm.org/D69384





More information about the llvm-commits mailing list