[PATCH] D57726: [SamplePGO][NFC] Minor improvement to replace a temporary vector with a brace-enclosed init list
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 16:52:48 PST 2019
wmi created this revision.
wmi added a reviewer: tejohnson.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Follow the change in https://reviews.llvm.org/rL353123.
Repository:
rL LLVM
https://reviews.llvm.org/D57726
Files:
lib/Transforms/IPO/SampleProfile.cpp
Index: lib/Transforms/IPO/SampleProfile.cpp
===================================================================
--- lib/Transforms/IPO/SampleProfile.cpp
+++ lib/Transforms/IPO/SampleProfile.cpp
@@ -1300,9 +1300,8 @@
SortedCallTargets, Sum, IPVK_IndirectCallTarget,
SortedCallTargets.size());
} else if (!dyn_cast<IntrinsicInst>(&I)) {
- SmallVector<uint32_t, 1> Weights;
- Weights.push_back(BlockWeights[BB]);
- I.setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights));
+ I.setMetadata(LLVMContext::MD_prof,
+ MDB.createBranchWeights({BlockWeights[BB]}));
}
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57726.185192.patch
Type: text/x-patch
Size: 722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190205/b625a3b6/attachment.bin>
More information about the llvm-commits
mailing list