PE
lib/Optimization/PartialEvaluation/ contains the LLPE partial-evaluation
infrastructure.
Headers: include/Optimization/PartialEvaluation/
Implementation: lib/Optimization/PartialEvaluation/
Overview
This subsystem contains the historical LLPE code used for aggressive
specialization, symbolic execution style reasoning, and partial evaluation over
LLVM IR. It is built as the CanaryPE static library and is separate from
the scalar, IPO, and prefetch libraries. It is not currently surfaced through
the lotus-opt-ipo or lotus-opt-prefetch frontends.
Main components
LLPE.hdefines the main analysis and integration machinery.ShadowInlines.hmodels shadow values, instructions, stores, and specialized state used during specialization.SharedTree.hprovides persistent tree structures used to represent shared analysis state.LLPECopyPaste.hcontains cloning and IR-rewriting helpers.TopLevel.cppregisters thellpe-analysislegacyModulePass.Integrator.cppregisters thellpelegacyModulePassthat commits the specialization chosen by the analysis.
Passes and options
llpe-analysisperforms the analysis phase and constructs specialization contexts.llperuns the integrator and commits the rewritten IR.-llpe-root=<name>selects the root function to specialize; the default ismain.
The subsystem also exposes a large set of LLPE-specific debugging and tuning
flags in CommandLine.cpp for controlling graph dumps, specialization limits,
environment modeling, statistics, and optional transforms.
Notes
The PE subsystem is primarily infrastructure code. If you are looking for front-end optimization passes exposed as stable tools, start with Optimization and Optimization Tools.