From a87e199c33f3a5b02be974a24172d68f754ed402 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Thu, 2 Jun 2016 01:52:05 +0000 Subject: [PATCH] make icall pass name consistent /NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271467 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Instrumentation/IndirectCallPromotion.cpp | 6 +++--- test/Transforms/PGOProfile/icp_mismatch_msg.ll | 4 ++-- test/Transforms/PGOProfile/indirect_call_promotion.ll | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp b/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp index d6cbe1a44fa..92847c59be1 100644 --- a/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp +++ b/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp @@ -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)); } diff --git a/test/Transforms/PGOProfile/icp_mismatch_msg.ll b/test/Transforms/PGOProfile/icp_mismatch_msg.ll index 17658844421..408996a5f09 100644 --- a/test/Transforms/PGOProfile/icp_mismatch_msg.ll +++ b/test/Transforms/PGOProfile/icp_mismatch_msg.ll @@ -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: :0:0: Cannot promote indirect call to func4 with count of 1234: The number of arguments mismatch ; CHECK: remark: :0:0: Cannot promote indirect call to 11517462787082255043 with count of 2345: Cannot find the target diff --git a/test/Transforms/PGOProfile/indirect_call_promotion.ll b/test/Transforms/PGOProfile/indirect_call_promotion.ll index 70dcd9c02cc..c35166505eb 100644 --- a/test/Transforms/PGOProfile/indirect_call_promotion.ll +++ b/test/Transforms/PGOProfile/indirect_call_promotion.ll @@ -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: :0:0: Promote indirect call to func4 with count 1030 out of 1600 ; PASS-REMARK: remark: :0:0: Promote indirect call to func2 with count 410 out of 570 ; PASS-REMARK: remark: :0:0: Promote indirect call to func3 with count 150 out of 160 -- 2.11.0