diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:08 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:08 +0000 |
commit | c7dac04c3480f3c20487f912f77343139fce2d99 (patch) | |
tree | 21a09bce0171e27bd1e92649db9df797fa097cea /include/llvm/IR/Function.h | |
parent | 044eb2f6afba375a914ac9d8024f8f5142bb912e (diff) |
Diffstat (limited to 'include/llvm/IR/Function.h')
-rw-r--r-- | include/llvm/IR/Function.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/IR/Function.h b/include/llvm/IR/Function.h index e811ae5e215a3..79c56abe1c377 100644 --- a/include/llvm/IR/Function.h +++ b/include/llvm/IR/Function.h @@ -248,6 +248,12 @@ public: /// pgo data. Optional<uint64_t> getEntryCount() const; + /// Return true if the function is annotated with profile data. + /// + /// Presence of entry counts from a profile run implies the function has + /// profile annotations. + bool hasProfileData() const { return getEntryCount().hasValue(); } + /// Returns the set of GUIDs that needs to be imported to the function for /// sample PGO, to enable the same inlines as the profiled optimized binary. DenseSet<GlobalValue::GUID> getImportGUIDs() const; |