Go to file
Michael J. Spencer 5bf1ead377 Add support for generating a call graph profile from Branch Frequency Info.
=== Generating the CG Profile ===

The CGProfile module pass simply gets the block profile count for each BB and scans for call instructions.  For each call instruction it adds an edge from the current function to the called function with the current BB block profile count as the weight.

After scanning all the functions, it generates an appending module flag containing the data. The format looks like:
```
!llvm.module.flags = !{!0}

!0 = !{i32 5, !"CG Profile", !1}
!1 = !{!2, !3, !4} ; List of edges
!2 = !{void ()* @a, void ()* @b, i64 32} ; Edge from a to b with a weight of 32
!3 = !{void (i1)* @freq, void ()* @a, i64 11}
!4 = !{void (i1)* @freq, void ()* @b, i64 20}
```

Differential Revision: https://reviews.llvm.org/D48105

llvm-svn: 335794
2018-06-27 23:58:08 +00:00
clang [analyzer] Add clangFrontend to target_link_libraries 2018-06-27 22:05:09 +00:00
clang-tools-extra [clang-tidy/ObjC] Add hashing algorithm acronyms to objc-property-declaration 2018-06-27 19:13:09 +00:00
compiler-rt [libFuzzer] [NFC] [Tests] Mark signal handling tests as UNSUPPORTED on Darwin 2018-06-27 23:11:24 +00:00
debuginfo-tests [debuginfo-tests] Always use the system python to invoke llgdb.py. 2018-06-10 19:38:26 +00:00
libclc atom: Use volatile pointers for cl_khr_{global,local}_int32_{base,extended}_atomics 2018-06-21 19:27:39 +00:00
libcxx [CMake] Fix install-cxx target. 2018-06-25 18:01:51 +00:00
libcxxabi [CMake] Convert paths to the right form in standalone builds on Windows 2018-06-20 20:59:18 +00:00
libunwind [CMake] Convert paths to the right form in standalone builds on Windows 2018-06-20 20:53:19 +00:00
lld [ELF] Use %eiz after disassembler change in r335768 2018-06-27 20:43:23 +00:00
lldb [SymbolFile] Implement GetCompleteObjCClass for .debug_names 2018-06-27 19:58:39 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm Add support for generating a call graph profile from Branch Frequency Info. 2018-06-27 23:58:08 +00:00
openmp [OPENMP, NVPTX] Fixes for NVPTX RTL 2018-06-25 13:43:35 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [ScopHelper] Cache ScopExpander results. 2018-06-27 20:35:02 +00:00
README.md

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.