diff options
| author | Wei Mi <wmi@google.com> | 2019-02-05 00:57:50 +0000 |
|---|---|---|
| committer | Wei Mi <wmi@google.com> | 2019-02-05 00:57:50 +0000 |
| commit | 4901f371a2808d52f886e76717f20ba4615c9f07 (patch) | |
| tree | 39ead41aab5c35cb657f7071b35f9ef40c4cc13f /llvm/lib/Transforms/IPO | |
| parent | 2bf74ec8c507dcb5cc71b21284cda98f6ba0e13e (diff) | |
| download | bcm5719-llvm-4901f371a2808d52f886e76717f20ba4615c9f07.tar.gz bcm5719-llvm-4901f371a2808d52f886e76717f20ba4615c9f07.zip | |
[SamplePGO][NFC] Minor improvement to replace a temporary vector with a
brace-enclosed init list.
Differential Revision: https://reviews.llvm.org/D57726
llvm-svn: 353129
Diffstat (limited to 'llvm/lib/Transforms/IPO')
| -rw-r--r-- | llvm/lib/Transforms/IPO/SampleProfile.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/SampleProfile.cpp b/llvm/lib/Transforms/IPO/SampleProfile.cpp index bc2ceec8ba4..74831846626 100644 --- a/llvm/lib/Transforms/IPO/SampleProfile.cpp +++ b/llvm/lib/Transforms/IPO/SampleProfile.cpp @@ -1327,9 +1327,8 @@ void SampleProfileLoader::propagateWeights(Function &F) { 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]})); } } } |

