1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/include/llvm
Michael J. Spencer 8c3c4e105e 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
..
ADT [ADT] drop_begin: use adl_begin/adl_end. NFC. 2018-06-27 19:39:03 +00:00
Analysis [ValueLattice] Return false if value range did not change in mergeIn. 2018-06-27 12:57:51 +00:00
AsmParser [ThinLTO] Parse module summary index from assembly 2018-06-26 13:56:49 +00:00
BinaryFormat [PowerPC] Add support for high and higha symbol modifiers on tls modifers. 2018-06-15 19:47:16 +00:00
Bitcode Fix for llvm-dis/llvm-bcanalyzer overflows 2018-06-04 19:20:02 +00:00
CodeGen Add support for generating a call graph profile from Branch Frequency Info. 2018-06-27 23:58:08 +00:00
Config Don't redefine a bunch of defines from llvm-config.h in config.h. 2018-05-10 14:45:05 +00:00
DebugInfo Move some code from PDBFileBuilder to MSFBuilder. 2018-06-27 21:18:15 +00:00
Demangle Move Compiler.h from Demangle back to Support 2018-06-04 22:53:38 +00:00
ExecutionEngine [ORC] Add LLJIT and LLLazyJIT, and replace OrcLazyJIT in LLI with LLLazyJIT. 2018-06-26 21:35:48 +00:00
FuzzMutate [llvm-opt-fuzzer] Avoid adding incorrect inputs to the fuzzer corpus 2018-02-05 11:05:47 +00:00
IR [ThinLTO] Print names in function import debug messages when available 2018-06-27 18:03:39 +00:00
IRReader LLParser: add an argument for overriding data layout and do not check alloca addr space 2018-01-30 22:32:39 +00:00
LineEditor
Linker Remove \brief commands from doxygen comments. 2018-05-01 15:54:18 +00:00
LTO IRGen: Write .dwo files when -split-dwarf-file is used together with -fthinlto-index. 2018-05-31 18:25:59 +00:00
MC [DWARFv5] Allow ".loc 0" to refer to the root file. 2018-06-22 14:16:11 +00:00
Object [Object] Allow iterating over an IRObjectFile's modules 2018-06-27 17:58:32 +00:00
ObjectYAML Resubmit [pdb] Change /DEBUG:GHASH to emit 8 byte hashes." 2018-05-17 22:55:15 +00:00
Option [Option] Remove an unnecessary conversion function. 2018-05-05 06:05:31 +00:00
Passes Fix build warning compiling TestPlugin on Windows and disable Passes plugin stuff on Windows since it fundamentally can't work 2018-05-19 03:05:30 +00:00
ProfileData [NFC] Change sample profile format enum name SPF_Raw_Binary to SPF_Binary. 2018-06-12 05:53:49 +00:00
Support Move some code from PDBFileBuilder to MSFBuilder. 2018-06-27 21:18:15 +00:00
TableGen TableGen/SearchableTables: Support more generic enums and tables 2018-06-21 13:36:22 +00:00
Target [GISel]: Add G_ADDRSPACE_CAST Opcode 2018-06-22 20:58:51 +00:00
Testing/Support [Testing/Support] Make Failed() matcher work with abstract error types 2018-04-10 14:11:53 +00:00
ToolDrivers llvm: add llvm-dlltool support to the archiver 2017-07-18 21:26:38 +00:00
Transforms Add support for generating a call graph profile from Branch Frequency Info. 2018-06-27 23:58:08 +00:00
WindowsManifest Fix bug 34608 by moving private header out of public header. 2017-09-14 23:01:13 +00:00
WindowsResource [llvm-readobj] Teach readobj to dump .res files (WindowsResource). 2017-09-20 18:33:35 +00:00
XRay XRayRecord.h: Add missing #include 2017-11-21 00:23:19 +00:00
CMakeLists.txt
InitializePasses.h Revert r335306 (and r335314) - the Call Graph Profile pass. 2018-06-22 05:33:57 +00:00
LinkAllIR.h Sink some IntrinsicInst.h and Intrinsics.h out of llvm/include 2017-09-07 23:27:44 +00:00
LinkAllPasses.h Revert r335306 (and r335314) - the Call Graph Profile pass. 2018-06-22 05:33:57 +00:00
module.modulemap Rename *CommandFlags.def to *CommandFlags.inc 2018-04-11 18:49:37 +00:00
module.modulemap.build [Modules] Add module for Config/llvm-config.h 2017-10-24 06:18:52 +00:00
Pass.h Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
PassAnalysisSupport.h [NFC] fix trivial typos in comments 2018-01-23 05:49:30 +00:00
PassInfo.h [Pass] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-09-06 23:05:38 +00:00
PassRegistry.h [Pass] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-09-06 23:05:38 +00:00
PassSupport.h [Pass] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-09-06 23:05:38 +00:00