[SampleFDO] Fix a bug in getOrCompHotCountThreshold/getOrCompColdCountThreshold
authorWei Mi <wmi@google.com>
Tue, 7 Aug 2018 18:13:10 +0000 (18:13 +0000)
committerWei Mi <wmi@google.com>
Tue, 7 Aug 2018 18:13:10 +0000 (18:13 +0000)
commitb1ef2cc53d057123e20b55f806bf2c82861b5967
treee20991118b5bde0459848312d4ccdb28cdb52c82
parent9ba51579fb331697c09441fdb1f77f267ff82c77
[SampleFDO] Fix a bug in getOrCompHotCountThreshold/getOrCompColdCountThreshold

getOrCompHotCountThreshold/getOrCompColdCountThreshold introduced in
https://reviews.llvm.org/D45377 contain a bad mistake and will only return 1 or 0
instead of the true hot/cold cutoff value. The patch fixes the mistake. But the
mistake seems not causing big performance difference according to internal server
benchmarks testing.

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

llvm-svn: 339162
llvm/lib/Analysis/ProfileSummaryInfo.cpp
llvm/test/Transforms/SampleProfile/Inputs/function_metadata.prof
llvm/test/Transforms/SampleProfile/function_metadata.ll