tromey / el-compilador

An SSA-based compiler for Emacs Lisp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing loop optimization

tromey opened this issue · comments

Consider this code:

(elcomp--do '(
	      (defun test-case ()
		(let ((i 0) (s 0))
		  (while (<= i 10000000)
		    (setq s (+ s i))
		    (setq i (1+ i)))
		  ))

	      )
	    ;; #'elcomp--c-translate
	    )

Here the compiler should be able to entirely eliminate the loop.