specify the allocation function in vnew
This commit is contained in:
parent
5ad8a2c6fe
commit
3f8af2ba7b
5 changed files with 30 additions and 12 deletions
4
ssa.c
4
ssa.c
|
@ -52,7 +52,7 @@ filluse(Fn *fn)
|
|||
tmp[t].phi = 0;
|
||||
tmp[t].cls = 0;
|
||||
if (tmp[t].use == 0)
|
||||
tmp[t].use = vnew(0, sizeof(Use));
|
||||
tmp[t].use = vnew(0, sizeof(Use), alloc);
|
||||
}
|
||||
for (b=fn->start; b; b=b->link) {
|
||||
for (p=b->phi; p; p=p->link) {
|
||||
|
@ -253,7 +253,7 @@ addfron(Blk *a, Blk *b)
|
|||
if (a->fron[n] == b)
|
||||
return;
|
||||
if (!a->nfron)
|
||||
a->fron = vnew(++a->nfron, sizeof a->fron[0]);
|
||||
a->fron = vnew(++a->nfron, sizeof a->fron[0], alloc);
|
||||
else
|
||||
vgrow(&a->fron, ++a->nfron);
|
||||
a->fron[a->nfron-1] = b;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue