LLVM-CGDATA(1)
π LLVM-CGDATA(1) β the LLVM CodeGen Data Tool
okay so bestie, welcome to the LLVM manual page for llvm-cgdata, no cap. this is the one you're gonna want bookmarked β¨
πΈ NAME πΈ
llvm-cgdata β the LLVM CodeGen Data Tool π
β¨ SYNOPSIS β¨
llvm-cgdata [commands] [options] (<binaries>|<.cgdata>)
π¦ DESCRIPTION π¦
so the llvm-cgdata utility parses raw codegen data embedded in compiled binary files and merges them into a single .cgdata file. it can also inspect and manipulate .cgdata files β icon behavior, honestly π
currently, the tool supports saving and restoring outlined hash trees and stable function maps, which lets you get more efficient function outlining and function merging across modules in subsequent compilations. it's giving "glow up between builds" π
and the design is extensible, meaning they can totally add more codegen summaries and optimization techniques later β main character energy, always room to grow π±
π COMMANDS π
bestie, you need at least one of these. not optional, it's literally the whole point:
--convertβ converts a.cgdatafile from one format to another π--mergeβ merges multiple raw codgen data in binaries into a single.cgdatafile π§¬--showβ shows summary information about a.cgdatafile π
β OPTIONS β
llvm-cgdata supports the following options, and yes i listed every single one π«Ά
--format=[text|binary]β specify the format of the output.cgdatafile. pick your era π--output=<string>β specify the output file name π--cgdata-versionβ prints the version of thellvm-cgdatatool. cute little flex β¨
π EXAMPLES π
converting binary β text, slay edition
to convert a .cgdata file from binary to text format:
$ llvm-cgdata --convert --format=text input.cgdata
--output=output.data
fr fr type it exactly like that, the --output=output.data goes on the next line the way it's written here π
merging a whole group chat of object files
to merge multiple raw codegen data in object files into a single .cgdata file:
$ llvm-cgdata --merge file1.o file2.o --output=merged.cgdata
it's giving "bringing everyone together" π«Ά
peeking at what's inside
to show summary information about a .cgdata file:
$ llvm-cgdata --show input.cgdata
lowkey my fave command, it's the vibe check of the whole tool π
π Author π
maintained by the LLVM Team (https://llvm.org/). we stan π«‘
π Copyright π
2003-2026, LLVM Project
and that's the whole page bestie, go forth and merge ππ
sign-off time: this lovely number is version 23, dated 2026-10-20 β LLVM-CGDATA(1), LLVM's very own. iykyk β¨π
π¦ where this page comes from
- arch rolling: llvm 23.1.4-1 Β· Apache-2.0 WITH LLVM-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms