Internals: Dump Ast expression pattern statistics like Dfg (#7818)

Remove the expression combination counts from the default stats file,
and add a new `--dump-ast-patterns` option, which will dump new
`*_ast_patterns_*.txt` files. These contain the expression combinations
in a similar S-expression format as Dfg already produces with
`--dump-dfg-stats`. These dumps are not produced by just `--stats` as
they are fairly expensive to compute. Currently the new option will dump
at two points: just before we change to C types via widthMin usage, and
just before emit.
This commit is contained in:
Geza Lore
2026-06-21 22:17:36 +01:00
committed by GitHub
parent fbea10b427
commit eafe9636cf
17 changed files with 633 additions and 115 deletions
+3
View File
@@ -959,6 +959,9 @@ void DfgVertex::unlinkDelete(DfgGraph& dfg) {
delete this;
}
//######################################################################
// Renders the canonical pattern S-expression for a single DfgVertex
class DfgPatternString final {
std::ostream& m_os;