[SamplePGO] Minor efficiency improvement in samplePGO ICP
authorTeresa Johnson <tejohnson@google.com>
Tue, 5 Feb 2019 00:18:38 +0000 (00:18 +0000)
committerTeresa Johnson <tejohnson@google.com>
Tue, 5 Feb 2019 00:18:38 +0000 (00:18 +0000)
commit4bdf82ce7990d10189501ec1a70bb4f16954b5ed
treec4c8dea665b8f83e40b8ebae2b82ebcdb2259866
parent81511e5428c4944a185474c7326b25319314a15e
[SamplePGO] Minor efficiency improvement in samplePGO ICP

Summary:
When attaching prof metadata to promoted direct calls in SamplePGO
mode, no need to construct and use a SmallVector to pass a single count
to the ArrayRef parameter, we can simply use a brace-enclosed init list.

This made a small but consistent improvement for a ThinLTO backend
compile I was measuring.

Reviewers: wmi

Subscribers: mehdi_amini, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D57706

llvm-svn: 353123
llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp