summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--6/simp.c7
-rw-r--r--opt/df.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/6/simp.c b/6/simp.c
index 4c27c6e..e4c1e05 100644
--- a/6/simp.c
+++ b/6/simp.c
@@ -492,13 +492,16 @@ FILE *f;
static void simpmatch(Simp *s, Node *n)
{
Node *end, *cur, *next; /* labels */
- Node *val;
+ Node *val, *tmp;
Node *m;
size_t i;
f = stdout;
end = genlbl();
- val = rval(s, n->matchstmt.val, NULL); /* FIXME: don't recompute, even if pure */
+ val = temp(s, n->matchstmt.val);
+ tmp = rval(s, n->matchstmt.val, val);
+ if (val != tmp)
+ append(s, set(val, tmp));
for (i = 0; i < n->matchstmt.nmatches; i++) {
m = n->matchstmt.matches[i];
diff --git a/opt/df.c b/opt/df.c
index 9a3177a..01185cd 100644
--- a/opt/df.c
+++ b/opt/df.c
@@ -15,5 +15,5 @@
void flow(Cfg *cfg)
{
- die("Flow analysis not implemented");
}
+