Add function entry counts from sample profiles.
authorDiego Novillo <dnovillo@google.com>
Wed, 13 May 2015 17:04:29 +0000 (17:04 +0000)
committerDiego Novillo <dnovillo@google.com>
Wed, 13 May 2015 17:04:29 +0000 (17:04 +0000)
commit0e0929ed98794acb11a65d0fe76ce34234783c4b
treef144cdec9596f4dcb38351de023ed134f5fa23ba
parent552cd9868300bf6c52e1cbd67693097238979422
Add function entry counts from sample profiles.

This patch uses the new function profile metadata "function_entry_count"
to annotate entry counts from sample profiles.

In a sampling profile, the total samples collected at the function entry
are an approximation for the number of times that function was invoked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237265 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SampleProfile.cpp
test/Transforms/SampleProfile/Inputs/entry_counts.prof [new file with mode: 0644]
test/Transforms/SampleProfile/entry_counts.ll [new file with mode: 0644]