summaryrefslogtreecommitdiff
path: root/bolt/CMakeLists.txt
diff options
context:
space:
mode:
authorMaksim Panchenko <maks@fb.com>2017-11-28 09:57:21 -0800
committerMaksim Panchenko <maks@fb.com>2017-11-28 09:57:21 -0800
commitd15b93badec2ffdfc6e5a01b9386cdefb4ea59ac (patch)
treea905687065090cb83b63feb11538649274495702 /bolt/CMakeLists.txt
parentb6f7c68a6c9a5e97dcc84cacc117f13ca01d42f1 (diff)
downloadllvm-d15b93badec2ffdfc6e5a01b9386cdefb4ea59ac.tar.gz
[BOLT] Major overhaul of profiling in BOLT
Summary: Profile reading was tightly coupled with building CFG. Since I plan to move to a new profile format that will be associated with CFG it is critical to decouple the two phases. We now have read profile right after the cfg was constructed, but before it is "canonicalized", i.e. CTCs will till be there. After reading the profile, we do a post-processing pass that fixes CFG and does some post-processing for debug info, such as inference of fall-throughs, which is still required with the current format. Another good reason for decoupling is that we can use profile with CFG to more accurately record fall-through branches during aggregation. At the moment we use "Offset" annotations to facilitate location of instructions corresponding to the profile. This might not be super efficient. However, once we switch to the new profile format the offsets would be no longer needed. We might keep them for the aggregator, but if we have to trust LBR data that might not be strictly necessary. I've tried to make changes while keeping backwards compatibly. This makes it easier to verify correctness of the changes, but that also means that we lose accuracy of the profile. Some refactoring is included. Flag "-prof-compat-mode" (on by default) is used for bug-level backwards compatibility. Disable it for more accurate tracing. (cherry picked from FBD6506156)
Diffstat (limited to 'bolt/CMakeLists.txt')
-rw-r--r--bolt/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/bolt/CMakeLists.txt b/bolt/CMakeLists.txt
index dd8a44975134..959b19915f10 100644
--- a/bolt/CMakeLists.txt
+++ b/bolt/CMakeLists.txt
@@ -63,6 +63,7 @@ add_llvm_tool(llvm-bolt
BinaryBasicBlock.cpp
BinaryContext.cpp
BinaryFunction.cpp
+ BinaryFunctionProfile.cpp
BinaryPassManager.cpp
CacheMetrics.cpp
DataAggregator.cpp