How anhtuyenibm/llvm-project works
LLVM is a compiler infrastructure monorepo, not one application with a single user workflow. The sampled material supports a Clang path from source processing into path-sensitive analysis, alongside BOLT’s binary-optimization pass infrastructure and Flang’s temporary-storage lowering support. The README describes broader compiler, optimizer, linker, and runtime capabilities, but those flows are not evidenced by the sampled files. Dashed links indicate plausible dispatch that the available excerpts do not verify.
Main entry points: BinaryPassManager.cpp Pass manager · ExprEngine.cpp Path analysis · Decl.h AST model · llvm-bolt.cpp BOLT driver
Components 15
Clang analysis
- Preprocessing
clang/include/clang/Lex/Preprocessor.h - Source tracking
clang/lib/Basic/SourceManager.cpp - AST model
clang/include/clang/AST/Decl.h - Path analysis
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp - Analysis interface
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h - Query parser
clang-tools-extra/clang-query/QueryParser.cpp
BOLT optimizer
- BOLT driver
bolt/tools/driver/llvm-bolt.cpp - Binary model
bolt/lib/Core/BinaryContext.cpp - Pass manager
bolt/lib/Rewrite/BinaryPassManager.cpp - Optimization passes
bolt/lib/Passes - Profile input
bolt/lib/Profile/DataReader.cpp - Binary rewriting
bolt/lib/Rewrite/RewriteInstance.cpp
Flang lowering
- Temporary storage
flang/lib/Optimizer/Builder/TemporaryStorage.cpp
Other components
- Compiler user
- Source files
Connections 14
- Compiler user → Source files: provides
README.md - Source files → Preprocessing: preprocesses
- Preprocessing → Source tracking: tracks locations
- Source tracking → AST model: supplies locations
- Analysis interface → Path analysis: exposes analysis
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h - Path analysis → AST model: analyzes expressions
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp - Path analysis → Analysis interface: runs checker callbacks
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp - Query parser → AST model: parses matcher queries
- BOLT driver → Binary model: loads binary
- BOLT driver → Pass manager: starts passes
- Pass manager → Optimization passes: dispatches passes
- Profile input → Pass manager: supplies profile
- Pass manager → Binary rewriting: rewrites binary
- Temporary storage → Compiler user: supports lowering