This is an archive of the discontinued LLVM Phabricator instance.

[SamplePGO] Minor efficiency improvement in samplePGO ICP
ClosedPublic

Authored by tejohnson on Feb 4 2019, 12:26 PM.

Details

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.

Diff Detail

Event Timeline

tejohnson created this revision.Feb 4 2019, 12:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 4 2019, 12:26 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 4 2019, 4:18 PM
This revision was automatically updated to reflect the committed changes.
wmi added a comment.Feb 4 2019, 4:29 PM

LGTM. There is such place in SampleProfileLoader pass. I will do the same for it.

Ugh sorry for committing before your LGTM - I saw the LGTM come in from you on the other patch but committed this one instead! Will leave it since you subsequently LGTM'ed.