1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-27 05:30:23 +02:00
guile/module/language/tree-il
Andy Wingo 60c1e5cc42 Fix bad algorithmic growth in fix-letrec
We were using list sets, which when you end up with thousands of
bindings in an SCC reaches the point where we are off the quadratic end
of the curve.  Fix to use intsets and intmaps instead.

* module/language/tree-il/fix-letrec.scm (compute-ids): New function.
(compute-referenced-and-assigned): Rename from analyze-lexicals, and
compute intsets.
(make-compute-free-variables): Rename from free-variables, return a
procedure instead of a hash table, and use intsets.  Use a global cache
to avoid quadratic behavior with regard to binding depth.
(compute-complex): Compute a global set of "complex" variables, as an
intset.
(compute-sccs): Use intsets and intmaps to compute the free-variable and
ordering edges.
(fix-scc, fix-term): Refactorings.
(reorder-bindings): Avoid a linear search.
(fix-letrec): Refactor.
2025-01-22 14:56:32 +01:00
..
analyze.scm Allow functions to mark themselves as maybe-unused 2023-08-24 11:43:15 +02:00
compile-bytecode.scm Fix typos throughout codebase. 2024-05-06 11:51:53 +02:00
compile-cps.scm More thorough lowering of lognot to CPS 2024-08-13 13:40:45 +02:00
cps-primitives.scm Allow string->utf8 to constant-fold 2023-11-15 10:44:21 +01:00
debug.scm Fix a check in the Tree-IL verifier 2025-01-22 12:14:30 +01:00
demux-lambda.scm New optimization: demux-lambda 2024-03-13 13:11:14 +01:00
effects.scm peval: better primcall folding in effect contexts 2023-11-15 19:31:24 +01:00
eta-expand.scm Add eta-expansion pass after peval 2020-01-15 16:11:15 +01:00
fix-letrec.scm Fix bad algorithmic growth in fix-letrec 2025-01-22 14:56:32 +01:00
inlinable-exports.scm Fix inlinable-exports serialization for kwargs 2024-03-18 16:40:32 +01:00
letrectify.scm Use tree-il-srcv instead of tree-il-src 2023-06-19 13:53:01 +02:00
optimize.scm Tree-IL lowerer has #:dump-optimized-tree-il? option 2024-04-23 13:06:34 +02:00
peval.scm Add a workaround for pre-3.0.10 incorrect inlinable exports 2024-09-23 14:07:53 +02:00
primitives.scm Recognize append as a primcall and optimize it 2023-11-27 14:30:41 +01:00
resolve-free-vars.scm -Oresolve-free-vars pass gracefully handles failed autoloads. 2022-01-11 21:32:40 +01:00
spec.scm Change -O1 compiler to use baseline and also resolve primitives 2020-06-01 21:15:39 +02:00