OSDN Git Service

make icall pass name consistent /NFC
authorXinliang David Li <davidxl@google.com>
Thu, 2 Jun 2016 01:52:05 +0000 (01:52 +0000)
committerXinliang David Li <davidxl@google.com>
Thu, 2 Jun 2016 01:52:05 +0000 (01:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271467 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
test/Transforms/PGOProfile/icp_mismatch_msg.ll
test/Transforms/PGOProfile/indirect_call_promotion.ll

index d6cbe1a..92847c5 100644 (file)
@@ -39,7 +39,7 @@
 
 using namespace llvm;
 
-#define DEBUG_TYPE "icall-promotion"
+#define DEBUG_TYPE "pgo-icall-prom"
 
 STATISTIC(NumOfPGOICallPromotion, "Number of indirect call promotions.");
 STATISTIC(NumOfPGOICallsites, "Number of indirect call candidate sites.");
@@ -333,7 +333,7 @@ ICallPromotionFunc::getPromotionCandidatesForCallSite(
       const char *Reason = StatusToString(Status);
       DEBUG(dbgs() << " Not promote: " << Reason << "\n");
       emitOptimizationRemarkMissed(
-          F.getContext(), "PGOIndirectCallPromotion", F, Inst->getDebugLoc(),
+          F.getContext(), "pgo-icall-prom", F, Inst->getDebugLoc(),
           Twine("Cannot promote indirect call to ") +
               (TargetFuncName.empty() ? Twine(Target) : Twine(TargetFuncName)) +
               Twine(" with count of ") + Twine(Count) + ": " + Reason);
@@ -607,7 +607,7 @@ void ICallPromotionFunc::promote(Instruction *Inst, Function *DirectCallee,
   DEBUG(dbgs() << *BB << *DirectCallBB << *IndirectCallBB << *MergeBB << "\n");
 
   emitOptimizationRemark(
-      F.getContext(), "PGOIndirectCallPromotion", F, Inst->getDebugLoc(),
+      F.getContext(), "pgo-icall-prom", F, Inst->getDebugLoc(),
       Twine("Promote indirect call to ") + DirectCallee->getName() +
           " with count " + Twine(Count) + " out of " + Twine(TotalCount));
 }
index 1765884..408996a 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: opt < %s -pgo-icall-prom -pass-remarks-missed=PGOIndirectCallPromotion -S 2>& 1 | FileCheck %s
-; RUN: opt < %s -passes=pgo-icall-prom -pass-remarks-missed=PGOIndirectCallPromotion -S 2>& 1 | FileCheck %s
+; RUN: opt < %s -pgo-icall-prom -pass-remarks-missed=pgo-icall-prom -S 2>& 1 | FileCheck %s
+; RUN: opt < %s -passes=pgo-icall-prom -pass-remarks-missed=pgo-icall-prom -S 2>& 1 | FileCheck %s
 
 ; CHECK: remark: <unknown>:0:0: Cannot promote indirect call to func4 with count of 1234: The number of arguments mismatch
 ; CHECK: remark: <unknown>:0:0: Cannot promote indirect call to 11517462787082255043 with count of 2345: Cannot find the target
index 70dcd9c..c351665 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: opt < %s -pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM
 ; RUN: opt < %s -passes=pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM
-; RUN: opt < %s -pgo-icall-prom -S -pass-remarks=PGOIndirectCallPromotion -icp-count-threshold=0 -icp-percent-threshold=0 -icp-max-prom=4 2>&1 | FileCheck %s --check-prefix=PASS-REMARK
-; RUN: opt < %s -passes=pgo-icall-prom -S -pass-remarks=PGOIndirectCallPromotion -icp-count-threshold=0 -icp-percent-threshold=0 -icp-max-prom=4 2>&1 | FileCheck %s --check-prefix=PASS-REMARK
+; RUN: opt < %s -pgo-icall-prom -S -pass-remarks=pgo-icall-prom -icp-count-threshold=0 -icp-percent-threshold=0 -icp-max-prom=4 2>&1 | FileCheck %s --check-prefix=PASS-REMARK
+; RUN: opt < %s -passes=pgo-icall-prom -S -pass-remarks=pgo-icall-prom -icp-count-threshold=0 -icp-percent-threshold=0 -icp-max-prom=4 2>&1 | FileCheck %s --check-prefix=PASS-REMARK
 ; PASS-REMARK: remark: <unknown>:0:0: Promote indirect call to func4 with count 1030 out of 1600
 ; PASS-REMARK: remark: <unknown>:0:0: Promote indirect call to func2 with count 410 out of 570
 ; PASS-REMARK: remark: <unknown>:0:0: Promote indirect call to func3 with count 150 out of 160