LLVM-CGDATA(1)

πŸ’– LLVM-CGDATA(1) πŸ’–

okay bestie, welcome to the LLVM manual section, page LLVM-CGDATA(1) β€” this is the glow-up guide for llvm-cgdata, the LLVM CodeGen Data Tool. buckle up, it's giving compiler-internals-slash-group-chat πŸ’…


✨ NAME ✨

llvm-cgdata β€” the LLVM CodeGen Data Tool. yes that's the whole name, she's simple and she slays πŸŽ€


🌸 SYNOPSIS 🌸

llvm-cgdata [commands] [options] (<binaries>|<.cgdata>)

πŸ¦‹ DESCRIPTION πŸ¦‹

so the llvm-cgdata utility parses raw codegen data that's embedded inside compiled binary files, and merges all of that into a single .cgdata file. iconic behaviour, honestly. it can also inspect and manipulate .cgdata files β€” multitasking queen πŸ‘‘

right now, 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. efficiency?? we love her fr fr.

and the design is extensible, meaning more codegen summaries and optimization techniques can be added later. she's built to grow, no cap 🌈


πŸ‘‘ COMMANDS πŸ‘‘

at least one of the following commands is required β€” you cannot just vibe in here with zero commands, bestie
  • --convert β€” converts a .cgdata file from one format to another. glow-up, but for file formats ✨
  • --merge β€” merges multiple raw codgen data in binaries into a single .cgdata file. (yes, the original says "codgen" β€” we keep the facts exactly as they are, even the typos, that's loyalty πŸ’–)
  • --show β€” shows summary information about a .cgdata file. the receipts, basically 🧾

πŸ’… OPTIONS πŸ’…

llvm-cgdata supports the following options:

  • --format=[text|binary] β€” specifies the format of the output .cgdata file. pick your aesthetic: text or binary πŸ’–
  • --output=<string> β€” specifies the output file name. name her, she deserves it πŸŽ€
  • --cgdata-version β€” prints the version of the llvm-cgdata tool. who are you? who who, who who 🌟

πŸ“ EXAMPLES πŸ“

to convert a .cgdata file from binary to text format:

$ llvm-cgdata --convert --format=text input.cgdata
--output=output.data

to merge multiple raw codegen data in object files into a single .cgdata file:

$ llvm-cgdata --merge file1.o file2.o --output=merged.cgdata

to show summary information about a .cgdata file:

$ llvm-cgdata --show input.cgdata

🫢 AUTHOR 🫢

maintained by the LLVM Team (https://llvm.org/). shoutout to the devs, they're the main characters fr πŸ’œ


2003-2026, LLVM Project


okay that's the whole page, you ate that πŸ’…βœ¨ this was LLVM manual page, version 21, dated 2026-07-22. go forth and merge your codegen data, bestie β€” i'm obsessed with you πŸ¦‹πŸŒΈπŸ’–

πŸ“¦ where this page comes from