nv50/ir: Initialize Instruction members.

Fix defects reported by Coverity Scan.

uninit_member: Non-static class member serial is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member sched is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member bb is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9037>
This commit is contained in:
Vinson Lee 2021-02-13 22:20:39 -08:00 committed by Marge Bot
parent 31dd0a4a1e
commit bf535c082b
1 changed files with 4 additions and 1 deletions

View File

@ -563,6 +563,7 @@ Symbol::equals(const Value *that, bool strict) const
void Instruction::init()
{
next = prev = 0;
serial = 0;
cc = CC_ALWAYS;
rnd = ROUND_N;
@ -589,6 +590,9 @@ void Instruction::init()
predSrc = -1;
flagsDef = -1;
flagsSrc = -1;
sched = 0;
bb = NULL;
}
Instruction::Instruction()
@ -599,7 +603,6 @@ Instruction::Instruction()
dType = sType = TYPE_F32;
id = -1;
bb = 0;
}
Instruction::Instruction(Function *fn, operation opr, DataType ty)