|
| 1 | +llvm-cgdata - LLVM CodeGen Data Tool |
| 2 | +==================================== |
| 3 | + |
| 4 | +.. program:: llvm-cgdata |
| 5 | + |
| 6 | +SYNOPSIS |
| 7 | +-------- |
| 8 | + |
| 9 | +:program:`llvm-cgdata` [**commands**] [**options**] (<binaries>|<.cgdata>) |
| 10 | + |
| 11 | +DESCRIPTION |
| 12 | +----------- |
| 13 | + |
| 14 | +The :program:llvm-cgdata utility parses raw codegen data embedded |
| 15 | +in compiled binary files and merges them into a single .cgdata file. |
| 16 | +It can also inspect and manipulate .cgdata files. |
| 17 | +Currently, the tool supports saving and restoring outlined hash trees, |
| 18 | +enabling global function outlining across modules, allowing for more |
| 19 | +efficient function outlining in subsequent compilations. |
| 20 | +The design is extensible, allowing for the incorporation of additional |
| 21 | +codegen summaries and optimization techniques, such as global function |
| 22 | +merging, in the future. |
| 23 | + |
| 24 | +COMMANDS |
| 25 | +-------- |
| 26 | + |
| 27 | +At least one of the following commands are required: |
| 28 | + |
| 29 | +.. option:: --convert |
| 30 | + |
| 31 | + Convert a .cgdata file from one format to another. |
| 32 | + |
| 33 | +.. option:: --merge |
| 34 | + |
| 35 | + Merge multiple raw codgen data in binaries into a single .cgdata file. |
| 36 | + |
| 37 | +.. option:: --show |
| 38 | + |
| 39 | + Show summary information about a .cgdata file. |
| 40 | + |
| 41 | +OPTIONS |
| 42 | +------- |
| 43 | + |
| 44 | +:program:`llvm-cgdata` supports the following options: |
| 45 | + |
| 46 | +.. option:: --format=[text|binary] |
| 47 | + |
| 48 | + Specify the format of the output .cgdata file. |
| 49 | + |
| 50 | +.. option:: --output=<string> |
| 51 | + |
| 52 | + Specify the output file name. |
| 53 | + |
| 54 | +.. option:: --cgdata-version |
| 55 | + |
| 56 | + Print the version of the llvm-cgdata tool. |
| 57 | + |
| 58 | +EXAMPLES |
| 59 | +-------- |
| 60 | + |
| 61 | +To convert a .cgdata file from binary to text format: |
| 62 | + $ llvm-cgdata --convert --format=text input.cgdata --output=output.data |
| 63 | + |
| 64 | +To merge multiple raw codegen data in object files into a single .cgdata file: |
| 65 | + $ llvm-cgdata --merge file1.o file2.o --output=merged.cgdata |
| 66 | + |
| 67 | +To show summary information about a .cgdata file: |
| 68 | + $ llvm-cgdata --show input.cgdata |
0 commit comments