commit 2380b5786a515af7149f7648d9e9c22a663e3a9c
parent 00f3d2228b96c03e63091f4c92fee0478f39328e
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Fri, 9 Dec 2016 04:26:11 -0500
make newtmp() return zeroed out temporaries
This was not necessary as temporaries were never freed
and returned from an array zero initialized. But in the
coming load optimization, we sometimes free temporaries
by resetting fn->ntmp.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/util.c b/util.c
@@ -250,6 +250,7 @@ newtmp(char *prfx, int k, Fn *fn)
t = fn->ntmp++;
vgrow(&fn->tmp, fn->ntmp);
+ memset(&fn->tmp[t], 0, sizeof(Tmp));
if (prfx)
sprintf(fn->tmp[t].name, "%s.%d", prfx, ++n);
fn->tmp[t].cls = k;