[llvm-branch-commits] [clang] c36f31c - [PGO] remove unintentional code in early commit

Rong Xu via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 14 18:49:28 PST 2020


Author: Rong Xu
Date: 2020-12-14T18:41:49-08:00
New Revision: c36f31c4db065e987160a776749f5da81efc24c5

URL: https://github.com/llvm/llvm-project/commit/c36f31c4db065e987160a776749f5da81efc24c5
DIFF: https://github.com/llvm/llvm-project/commit/c36f31c4db065e987160a776749f5da81efc24c5.diff

LOG: [PGO] remove unintentional code in early commit

Remove unintentional code in
commit 54e03d [PGO] Verify BFI counts after loading profile data.

Added: 
    

Modified: 
    clang/lib/CodeGen/CGCall.cpp
    clang/lib/CodeGen/CodeGenModule.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index ced287643c28..73194be922dd 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -1943,11 +1943,6 @@ void CodeGenModule::ConstructAttributeList(
       FuncAttrs.addAttribute(llvm::Attribute::NoReturn);
     if (TargetDecl->hasAttr<ColdAttr>())
       FuncAttrs.addAttribute(llvm::Attribute::Cold);
-    if (TargetDecl->hasAttr<HotAttr>()) {
-      // xur
-      fprintf(stderr, "hihi 2\n");
-      //      FuncAttrs.addAttribute(llvm::Attribute::Hot);
-    }
     if (TargetDecl->hasAttr<NoDuplicateAttr>())
       FuncAttrs.addAttribute(llvm::Attribute::NoDuplicate);
     if (TargetDecl->hasAttr<ConvergentAttr>())

diff  --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index dec0cba84343..0bb9c91f2434 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1744,13 +1744,6 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
         B.addAttribute(llvm::Attribute::OptimizeForSize);
       B.addAttribute(llvm::Attribute::Cold);
     }
-    if (D->hasAttr<HotAttr>()) {
-      if (!ShouldAddOptNone)
-        B.addAttribute(llvm::Attribute::OptimizeForSize);
-      // xur
-      //      B.addAttribute(llvm::Attribute::Hot);
-      fprintf(stderr, "hihi 1\n");
-    }
 
     if (D->hasAttr<MinSizeAttr>())
       B.addAttribute(llvm::Attribute::MinSize);


        


More information about the llvm-branch-commits mailing list