[PGO] remove unintentional code in early commit
authorRong Xu <xur@google.com>
Tue, 15 Dec 2020 02:41:09 +0000 (18:41 -0800)
committerRong Xu <xur@google.com>
Tue, 15 Dec 2020 02:41:49 +0000 (18:41 -0800)
Remove unintentional code in
commit 54e03d [PGO] Verify BFI counts after loading profile data.

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

index ced2876..73194be 100644 (file)
@@ -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>())
index dec0cba..0bb9c91 100644 (file)
@@ -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);