diff --git a/benchmarks/constant_prop.lisp b/benchmarks/constant_prop.lisp new file mode 100644 index 0000000..c1c253a --- /dev/null +++ b/benchmarks/constant_prop.lisp @@ -0,0 +1 @@ +(print (add1 (sub1 (+ 3 (- 4 (if false 1 2)))))) \ No newline at end of file diff --git a/benchmarks/cse.lisp b/benchmarks/cse.lisp new file mode 100644 index 0000000..75aec43 --- /dev/null +++ b/benchmarks/cse.lisp @@ -0,0 +1,11 @@ +( + let ((a (read-num))) ( + let ((b (read-num))) ( + let ((c (+ a b))) ( + let ((d (+ a b))) ( + print (+ (+ a b) (+ c d)) + ) + ) + ) + ) +) \ No newline at end of file diff --git a/benchmarks/example.lisp b/benchmarks/example.lisp deleted file mode 100644 index ebc396f..0000000 --- a/benchmarks/example.lisp +++ /dev/null @@ -1,2 +0,0 @@ -(define (f x) (+ x 3)) -(print (f 4)) diff --git a/benchmarks/hybrid.lisp b/benchmarks/hybrid.lisp new file mode 100644 index 0000000..866cee7 --- /dev/null +++ b/benchmarks/hybrid.lisp @@ -0,0 +1,10 @@ +(define (f a b)( + let ((c (+ a b))) ( + let ((d (+ a b))) ( + + (+ a b) (+ c d) + ) + ) + ) +) + +(print (+ (f 1 2) (f 3 4))) \ No newline at end of file diff --git a/benchmarks/inline.lisp b/benchmarks/inline.lisp new file mode 100644 index 0000000..b04a685 --- /dev/null +++ b/benchmarks/inline.lisp @@ -0,0 +1,6 @@ +(define (f x y) (- (+ 1 y) x)) +(let ((a 1)) ( + let ((b 2)) ( + print (f (f a 5) 6) + ) +)) \ No newline at end of file