llvm.org GIT mirror llvm / a87e199
make icall pass name consistent /NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271467 91177308-0d34-0410-b5e6-96231b3b80d8 Xinliang David Li 3 years ago
3 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
3838
3939 using namespace llvm;
4040
41 #define DEBUG_TYPE "icall-promotion"
41 #define DEBUG_TYPE "pgo-icall-prom"
4242
4343 STATISTIC(NumOfPGOICallPromotion, "Number of indirect call promotions.");
4444 STATISTIC(NumOfPGOICallsites, "Number of indirect call candidate sites.");
332332 const char *Reason = StatusToString(Status);
333333 DEBUG(dbgs() << " Not promote: " << Reason << "\n");
334334 emitOptimizationRemarkMissed(
335 F.getContext(), "PGOIndirectCallPromotion", F, Inst->getDebugLoc(),
335 F.getContext(), "pgo-icall-prom", F, Inst->getDebugLoc(),
336336 Twine("Cannot promote indirect call to ") +
337337 (TargetFuncName.empty() ? Twine(Target) : Twine(TargetFuncName)) +
338338 Twine(" with count of ") + Twine(Count) + ": " + Reason);
606606 DEBUG(dbgs() << *BB << *DirectCallBB << *IndirectCallBB << *MergeBB << "\n");
607607
608608 emitOptimizationRemark(
609 F.getContext(), "PGOIndirectCallPromotion", F, Inst->getDebugLoc(),
609 F.getContext(), "pgo-icall-prom", F, Inst->getDebugLoc(),
610610 Twine("Promote indirect call to ") + DirectCallee->getName() +
611611 " with count " + Twine(Count) + " out of " + Twine(TotalCount));
612612 }
None ; RUN: opt < %s -pgo-icall-prom -pass-remarks-missed=PGOIndirectCallPromotion -S 2>& 1 | FileCheck %s
1 ; RUN: opt < %s -passes=pgo-icall-prom -pass-remarks-missed=PGOIndirectCallPromotion -S 2>& 1 | FileCheck %s
0 ; RUN: opt < %s -pgo-icall-prom -pass-remarks-missed=pgo-icall-prom -S 2>& 1 | FileCheck %s
1 ; RUN: opt < %s -passes=pgo-icall-prom -pass-remarks-missed=pgo-icall-prom -S 2>& 1 | FileCheck %s
22
33 ; CHECK: remark: :0:0: Cannot promote indirect call to func4 with count of 1234: The number of arguments mismatch
44 ; CHECK: remark: :0:0: Cannot promote indirect call to 11517462787082255043 with count of 2345: Cannot find the target
0 ; RUN: opt < %s -pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM
11 ; RUN: opt < %s -passes=pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM
2 ; 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
3 ; 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
2 ; 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
3 ; 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
44 ; PASS-REMARK: remark: :0:0: Promote indirect call to func4 with count 1030 out of 1600
55 ; PASS-REMARK: remark: :0:0: Promote indirect call to func2 with count 410 out of 570
66 ; PASS-REMARK: remark: :0:0: Promote indirect call to func3 with count 150 out of 160