Nisse
Nisse contains an LLVM new-pass-manager analysis and transform under
Transform/Nisse.
Headers: include/Transform/Nisse/
Implementation: lib/Transform/Nisse/
Overview
The subsystem packages graph-based CFG edge analyses together with several
instrumentation and rewrite passes. It now includes the original Nisse and
KS pipelines plus the newer PRUE flow, which inserts delayed delta-counter
updates and rewrites them after optimization.
Main components
Edge.cppimplements CFG edge instrumentation, including SESE-aware and local delta-counter updates.NisseAnalysis.cppprovidesNisseAnalysisandKSAnalysisto build edge sets, spanning trees, and well-founded loop annotations.NissePass.cppimplementsNissePassandKSPass, which materialize global counter/index arrays, emitinfo.prof, and call the profiling runtime inprof.c.PRUE.cppimplementsDeltaCounterPassandPruePassfor the optimizer-friendly PRUE instrumentation/rewrite pipeline.NissePlugin.cppregisters the analyses and the pass pipeline names for the new pass manager plugin.NissePropagation.cppis a standalone propagation utility that reconstructs full edge and basic-block frequencies from.graphand profiling files.
Registered passes
The plugin registers the following module pipeline names:
nisse- run the main Nisse edge instrumentation passks- run the KS variant after loop simplification and critical-edge breakingprue-delta- insert local delta counters and mark updates for PRUEprue- perform the late PRUE rewrite
In addition, the plugin hooks DeltaCounterPass at pipeline start and
PruePass at the optimizer’s last extension point.
Artifacts
info.profrecords each instrumented function and the number of counters assigned to it.main.profis emitted bynisse_pass_print_datainprof.cand stores counter values indexed by edge id.<function>.graphis written by the analysis to describe the CFG, spanning tree, and instrumented edges.NissePropagation.cppcan consume those files and emit propagated.edgesand.bbsummaries.
Notes
CanaryNisse is built from Edge.cpp, NisseAnalysis.cpp,
NissePass.cpp, PRUE.cpp, NissePlugin.cpp, and prof.c as defined
in lib/Transform/Nisse/CMakeLists.txt. NissePropagation.cpp currently
serves as a standalone utility rather than part of the library target.