chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] mark let-bound variables as inline-transient


From: Felix
Subject: [Chicken-hackers] [PATCH] mark let-bound variables as inline-transient
Date: Thu, 29 Sep 2011 03:38:42 -0400 (EDT)

Inlining introduces renamed variables which are not yet
recorded in the analysis-database, and this could result in
certain assignments to variables in the bodies of inlined
procedures being optimized away. To avoid this, inlined
and renamed variables are marked as "inline-transient" - the
mark vanishes in the next optimization pass. The marking
was done for lambda-bound variables but not for let-bound
variables.


cheers,
felix
diff --git a/support.scm b/support.scm
index cb95c0d..d2444b8 100644
--- a/support.scm
+++ b/support.scm
@@ -673,6 +673,7 @@
                  (val1 (walk (first subs) rl))
                  (a (gensym v))
                  (rl2 (alist-cons v a rl)) )
+            (put! db a 'inline-transient #t)
             (make-node 
              'let (list a)
              (list val1 (walk (second subs) rl2)))) ]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]