Commit 801e40a0 authored by Russ Cox's avatar Russ Cox

cmd/gc: rename AFATVARDEF to AVARDEF

The "fat" referred to being used for multiword values only.
We're going to use it for non-fat values sometimes too.

No change other than the renaming.

TBR=iant
CC=golang-codereviews
https://golang.org/cl/63650043
parent 824e918c
......@@ -772,7 +772,7 @@ clearfat(Node *nl)
if(componentgen(N, nl))
return;
gfatvardef(nl);
gvardef(nl);
c = w % 4; // bytes
q = w / 4; // quads
......
......@@ -1164,7 +1164,7 @@ copyu(Prog *p, Adr *v, Adr *s)
case APCDATA:
case AFUNCDATA:
case AFATVARDEF:
case AVARDEF:
return 0;
}
}
......
......@@ -29,7 +29,7 @@ static ProgInfo progtable[ALAST] = {
[AUNDEF]= {Break},
[AUSEFIELD]= {OK},
[ACHECKNIL]= {LeftRead},
[AFATVARDEF]= {Pseudo | RightWrite},
[AVARDEF]= {Pseudo | RightWrite},
// NOP is an internal no-op that also stands
// for USED and SET annotations, not the Intel opcode.
......
......@@ -198,7 +198,7 @@ enum as
AFUNCDATA,
APCDATA,
ACHECKNIL,
AFATVARDEF,
AVARDEF,
AMRC, // MRC/MCR
......
......@@ -1023,7 +1023,7 @@ clearfat(Node *nl)
if(debug['g'])
dump("\nclearfat", nl);
gfatvardef(nl);
gvardef(nl);
w = nl->type->width;
// Avoid taking the address for simple enough types.
......
......@@ -41,7 +41,7 @@ static ProgInfo progtable[ALAST] = {
[AUNDEF]= {Break},
[AUSEFIELD]= {OK},
[ACHECKNIL]= {LeftRead},
[AFATVARDEF]= {Pseudo | RightWrite},
[AVARDEF]= {Pseudo | RightWrite},
// NOP is an internal no-op that also stands
// for USED and SET annotations, not the Intel opcode.
......
......@@ -762,7 +762,7 @@ enum as
AFUNCDATA,
APCDATA,
ACHECKNIL,
AFATVARDEF,
AVARDEF,
ALAST
};
......
......@@ -78,7 +78,7 @@ clearfat(Node *nl)
if(componentgen(N, nl))
return;
gfatvardef(nl);
gvardef(nl);
c = w % 4; // bytes
q = w / 4; // quads
......
......@@ -41,7 +41,7 @@ static ProgInfo progtable[ALAST] = {
[AUNDEF]= {Break},
[AUSEFIELD]= {OK},
[ACHECKNIL]= {LeftRead},
[AFATVARDEF]= {Pseudo | RightWrite},
[AVARDEF]= {Pseudo | RightWrite},
// NOP is an internal no-op that also stands
// for USED and SET annotations, not the Intel opcode.
......
......@@ -579,7 +579,7 @@ enum as
AFUNCDATA,
APCDATA,
ACHECKNIL,
AFATVARDEF,
AVARDEF,
ALAST
};
......
......@@ -768,7 +768,7 @@ cgen_eface(Node *n, Node *res)
*/
Node dst;
gfatvardef(res);
gvardef(res);
dst = *res;
dst.type = types[tptr];
dst.xoffset += widthptr;
......@@ -797,7 +797,7 @@ cgen_slice(Node *n, Node *res)
if(n->list->next->next)
offs = n->list->next->next->n;
gfatvardef(res);
gvardef(res);
// dst.len = hi [ - lo ]
dst = *res;
......
......@@ -1494,7 +1494,7 @@ void gdatacomplex(Node*, Mpcplx*);
void gdatastring(Node*, Strlit*);
void ggloblnod(Node *nam);
void ggloblsym(Sym *s, int32 width, int dupok, int rodata);
void gfatvardef(Node*);
void gvardef(Node*);
Prog* gjmp(Prog*);
void gused(Node*);
void movelarge(NodeList*);
......
......@@ -32,28 +32,28 @@ makefuncdatasym(char *namefmt, int64 funcdatakind)
}
void
gfatvardef(Node *n)
gvardef(Node *n)
{
if(n == N || !isfat(n->type))
fatal("gfatvardef: node is not fat");
fatal("gvardef: node is not fat");
switch(n->class) {
case PAUTO:
case PPARAM:
case PPARAMOUT:
gins(AFATVARDEF, N, n);
gins(AVARDEF, N, n);
}
}
static void
removefatvardef(Prog *firstp)
removevardef(Prog *firstp)
{
Prog *p;
for(p = firstp; p != P; p = p->link) {
while(p->link != P && p->link->as == AFATVARDEF)
while(p->link != P && p->link->as == AVARDEF)
p->link = p->link->link;
if(p->to.type == D_BRANCH)
while(p->to.u.branch != P && p->to.u.branch->as == AFATVARDEF)
while(p->to.u.branch != P && p->to.u.branch->as == AVARDEF)
p->to.u.branch = p->to.u.branch->link;
}
}
......@@ -249,7 +249,7 @@ compile(Node *fn)
frame(0);
// Remove leftover instrumentation from the instruction stream.
removefatvardef(ptxt);
removevardef(ptxt);
ret:
lineno = lno;
}
......
......@@ -710,7 +710,7 @@ progeffects(Prog *prog, Array *vars, Bvec *uevar, Bvec *varkill, Bvec *avarinit)
if(info.flags & (LeftRead | LeftAddr))
bvset(uevar, pos);
if(info.flags & LeftWrite)
if(from->node != nil && (!isfat(from->node->type) || prog->as == AFATVARDEF))
if(from->node != nil && (!isfat(from->node->type) || prog->as == AVARDEF))
bvset(varkill, pos);
}
}
......@@ -736,7 +736,7 @@ Next:
if(info.flags & (RightRead | RightAddr))
bvset(uevar, pos);
if(info.flags & RightWrite)
if(to->node != nil && (!isfat(to->node->type) || prog->as == AFATVARDEF))
if(to->node != nil && (!isfat(to->node->type) || prog->as == AVARDEF))
bvset(varkill, pos);
}
}
......
......@@ -1518,7 +1518,7 @@ Optab optab[] =
{ AFUNCDATA, yfuncdata, Px, 0,0 },
{ APCDATA, ypcdata, Px, 0,0 },
{ ACHECKNIL },
{ AFATVARDEF },
{ AVARDEF },
{ AEND },
0
......
......@@ -1146,7 +1146,7 @@ static Optab optab[] =
{ AFUNCDATA, yfuncdata, Px, 0,0 },
{ APCDATA, ypcdata, Px, 0,0 },
{ ACHECKNIL },
{ AFATVARDEF },
{ AVARDEF },
0
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment