LLVM-CGDATA(1)

πŸ’– llvm-cgdata β€” the LLVM CodeGen Data Tool πŸ’–

okay bestie, welcome to the llvm-cgdata manual page (that's LLVM-CGDATA(1) for the girlies keeping track, part of the LLVM fam ✨). this lil tool is genuinely so useful and nobody talks about her enough, so sit down, grab a strawberry πŸ“, and let's get into it.


🌸 NAME 🌸

llvm-cgdata β€” the LLVM CodeGen Data Tool. that's the whole name, she's simple like that πŸ’…


✨ SYNOPSIS ✨

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

so yeah, you feed her commands, you feed her options, and then you point her at either your binaries or your .cgdata files. one or the other, she knows what to do 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

the llvm-cgdata utility parses raw codegen data embedded in compiled binary files and merges them into a single .cgdata file. iconic behavior, honestly. but wait, there's more β€” she can also inspect and manipulate .cgdata files after the fact. main character with range 😭

right now, the tool supports saving and restoring outlined hash trees and stable function maps, which is how you get more efficient function outlining and function merging across modules in subsequent compilations. so like, she's doing the work now so future-you's compilations are faster. that's called investment, periodt πŸ’œ

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


πŸ‘‘ COMMANDS πŸ‘‘

okay so here's the thing: you need at least one of these. she's not gonna guess what you want, bestie. at least one, minimum, that's the vibe check:

  • --convert β€” convert a .cgdata file from one format to another. glow-up but for file formats πŸ’…
  • --merge β€” merge multiple raw codegen data in binaries into a single .cgdata file. girl math but it adds up πŸ”₯
  • --show β€” show summary information about a .cgdata file. just a little peek, a lil gossip session with your data πŸ™ˆ

πŸŽ€ OPTIONS πŸŽ€

llvm-cgdata supports the following options:

  • --format=[text|binary] β€” specify the format of the output .cgdata file. text or binary, pick your fighter ⭐
  • --output=<string> β€” specify the output file name. where she's gonna drop the goods πŸ“
  • --cgdata-version β€” print the version of the llvm-cgdata tool. sometimes you just gotta know who you're talking to 😌

🌈 EXAMPLES 🌈

convert a .cgdata file from binary to text format:

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

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

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

show summary information about a .cgdata file:

$ llvm-cgdata --show input.cgdata

see? not scary. she's literally just a girl 🧚


πŸ’œ AUTHOR πŸ’œ

maintained by the LLVM Team</c> (https://llvm.org/). the whole squad, holding it down 🫢


2003-2025, LLVM Project β€” twenty-two years of excellence and she's still serving looks πŸ‘‘


okay that's the whole page bestie, you're officially a llvm-cgdata girlie now. go merge something. slay πŸ’…βœ¨

this has been llvm-cgdata from LLVM 20, dated 2025-09-03 β€” stay iconic, drink water, and remember: the manual page is LLVM-CGDATA(1) and she ate πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from