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 .cgdata file from one format to another πŸ”„
  • --merge β€” merges multiple raw codgen data in binaries into a single .cgdata file 🧬
  • --show β€” shows summary information about a .cgdata file πŸ‘€

⭐ OPTIONS ⭐

llvm-cgdata supports the following options, and yes i listed every single one 🫢

  • --format=[text|binary] β€” specify the format of the output .cgdata file. pick your era πŸ’–
  • --output=<string> β€” specify the output file name πŸ“
  • --cgdata-version β€” prints the version of the llvm-cgdata tool. 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 🫑

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