[PATCH] D57706: [SamplePGO] Minor efficiency improvement in samplePGO ICP
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 16:18:23 PST 2019
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rL353123: [SamplePGO] Minor efficiency improvement in samplePGO ICP (authored by tejohnson, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57706/new/
https://reviews.llvm.org/D57706
Files:
llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
Index: llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
+++ llvm/trunk/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
@@ -310,10 +310,10 @@
promoteCallWithIfThenElse(CallSite(Inst), DirectCallee, BranchWeights);
if (AttachProfToDirectCall) {
- SmallVector<uint32_t, 1> Weights;
- Weights.push_back(Count);
MDBuilder MDB(NewInst->getContext());
- NewInst->setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights));
+ NewInst->setMetadata(
+ LLVMContext::MD_prof,
+ MDB.createBranchWeights({static_cast<uint32_t>(Count)}));
}
using namespace ore;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57706.185184.patch
Type: text/x-patch
Size: 775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190205/4b5932bd/attachment.bin>
More information about the llvm-commits
mailing list