diff options
author | Dehao Chen <dehao@google.com> | 2016-02-22 22:46:21 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2016-02-22 22:46:21 +0000 |
commit | 6c73b49911e29dc89d40dd95e5548d2359d53414 (patch) | |
tree | 1e413ebe4674435571fe8a822b9b0c202b5ba748 /llvm/test/Transforms/SampleProfile/entry_counts.ll | |
parent | 3a7def09fece8d6a403f5002dd4811704fa2b3c4 (diff) | |
download | bcm5719-llvm-6c73b49911e29dc89d40dd95e5548d2359d53414.tar.gz bcm5719-llvm-6c73b49911e29dc89d40dd95e5548d2359d53414.zip |
Set function entry count as 0 if sample profile is not found for the function.
Summary: This change makes the sample profile's behavior consistent with instr profile.
Reviewers: davidxl, eraman, dnovillo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17522
llvm-svn: 261587
Diffstat (limited to 'llvm/test/Transforms/SampleProfile/entry_counts.ll')
-rw-r--r-- | llvm/test/Transforms/SampleProfile/entry_counts.ll | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SampleProfile/entry_counts.ll b/llvm/test/Transforms/SampleProfile/entry_counts.ll index 50cd575295a..6d1d4318abf 100644 --- a/llvm/test/Transforms/SampleProfile/entry_counts.ll +++ b/llvm/test/Transforms/SampleProfile/entry_counts.ll @@ -8,6 +8,13 @@ entry: ret void, !dbg !9 } +; This function does not have profile, check if function_entry_count is 0 +; CHECK: {{.*}} = !{!"function_entry_count", i64 0} +define void @no_profile() { +entry: + ret void +} + !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!6, !7} !llvm.ident = !{!8} |