From 93ca0209c0daf4988ee1ceb509b043a80a8ac40e Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Wed, 24 Jul 2019 14:04:21 -0400 Subject: [PATCH] Better TODOs --- optimization.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/optimization.py b/optimization.py index 7beef77..833ffdd 100644 --- a/optimization.py +++ b/optimization.py @@ -4,6 +4,7 @@ PUSHING_INSTRUCTIONS_WITHOUT_SIDE_EFFECTS = set( ('push',), ) +# TODO Some instructions may not touch the stack, so if these occur between a push and a drop we could still optimize def push_drop_optimization(ir): ir = tuple(ir) @@ -20,7 +21,7 @@ def push_drop_optimization(ir): yield ir[i] i += 1 -# TODO This can be smarter +# TODO We might be able to trace program flow to eliminate usages even if variables have the same name def unused_pop_optimization(ir): ir = tuple(ir) -- 2.20.1