summaryrefslogtreecommitdiffstats
path: root/llvm/test/Verifier/function-metadata-good.ll
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2015-05-13 15:13:45 +0000
committerDiego Novillo <dnovillo@google.com>2015-05-13 15:13:45 +0000
commit2567f3d0fb1f2812f99111ecd67d228ccae42c49 (patch)
tree365e1e894c459f612277ef5da02f2f53ecd2d384 /llvm/test/Verifier/function-metadata-good.ll
parentbbcf75e59eaa027251e060043067257c64a866ba (diff)
downloadbcm5719-llvm-2567f3d0fb1f2812f99111ecd67d228ccae42c49.tar.gz
bcm5719-llvm-2567f3d0fb1f2812f99111ecd67d228ccae42c49.zip
Add function entry count metadata.
Summary: This adds three Function methods to handle function entry counts: setEntryCount() and getEntryCount(). Entry counts are stored under the MD_prof metadata node with the name "function_entry_count". They are unsigned 64 bit values set by profilers (instrumentation and sample profiler changes coming up). Added documentation for new profile metadata and tests. Reviewers: dexonsmith, bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9628 llvm-svn: 237260
Diffstat (limited to 'llvm/test/Verifier/function-metadata-good.ll')
-rw-r--r--llvm/test/Verifier/function-metadata-good.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/Verifier/function-metadata-good.ll b/llvm/test/Verifier/function-metadata-good.ll
new file mode 100644
index 00000000000..3d73a1c0694
--- /dev/null
+++ b/llvm/test/Verifier/function-metadata-good.ll
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s -o /dev/null 2>&1
+
+; Function foo() is called 2,304 times at runtime.
+define i32 @foo() !prof !0 {
+ ret i32 0
+}
+
+!0 = !{!"function_entry_count", i32 2304}
OpenPOWER on IntegriCloud