diff options
author | Wei Mi <wmi@google.com> | 2018-08-07 18:13:10 +0000 |
---|---|---|
committer | Wei Mi <wmi@google.com> | 2018-08-07 18:13:10 +0000 |
commit | b1ef2cc53d057123e20b55f806bf2c82861b5967 (patch) | |
tree | e20991118b5bde0459848312d4ccdb28cdb52c82 /llvm/test/Transforms/SampleProfile | |
parent | 9ba51579fb331697c09441fdb1f77f267ff82c77 (diff) | |
download | bcm5719-llvm-b1ef2cc53d057123e20b55f806bf2c82861b5967.tar.gz bcm5719-llvm-b1ef2cc53d057123e20b55f806bf2c82861b5967.zip |
[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
Diffstat (limited to 'llvm/test/Transforms/SampleProfile')
-rw-r--r-- | llvm/test/Transforms/SampleProfile/Inputs/function_metadata.prof | 2 | ||||
-rw-r--r-- | llvm/test/Transforms/SampleProfile/function_metadata.ll | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/llvm/test/Transforms/SampleProfile/Inputs/function_metadata.prof b/llvm/test/Transforms/SampleProfile/Inputs/function_metadata.prof index 4a348d9fa07..239b5014b36 100644 --- a/llvm/test/Transforms/SampleProfile/Inputs/function_metadata.prof +++ b/llvm/test/Transforms/SampleProfile/Inputs/function_metadata.prof @@ -1,4 +1,6 @@ test:10000:0 + 2: 100 + 3: 100 3: foo:1000 3: bar:200 4: baz:10 diff --git a/llvm/test/Transforms/SampleProfile/function_metadata.ll b/llvm/test/Transforms/SampleProfile/function_metadata.ll index 41cff6e7977..18363514711 100644 --- a/llvm/test/Transforms/SampleProfile/function_metadata.ll +++ b/llvm/test/Transforms/SampleProfile/function_metadata.ll @@ -27,8 +27,10 @@ define void @test_liveness() !dbg !12 { } ; GUIDs of foo, bar, foo1, foo2 and foo3 should be included in the metadata to -; make sure hot inline stacks are imported. -; CHECK: ![[ENTRY_TEST]] = !{!"function_entry_count", i64 1, i64 2494702099028631698, i64 6699318081062747564, i64 7546896869197086323, i64 7682762345278052905, i64 -7908226060800700466, i64 -2012135647395072713} +; make sure hot inline stacks are imported. The total count of baz is lower +; than the hot cutoff threshold and its GUID should not be included in the +; metadata. +; CHECK: ![[ENTRY_TEST]] = !{!"function_entry_count", i64 1, i64 2494702099028631698, i64 6699318081062747564, i64 7682762345278052905, i64 -7908226060800700466, i64 -2012135647395072713} ; Check GUIDs for both foo and foo_available are included in the metadata to ; make sure the liveness analysis can capture the dependency from test_liveness |