glsl: implement phi nodes

This commit is contained in:
ameerj 2021-05-24 19:33:11 -04:00
parent 3d9ecbe998
commit e99d01ff53
4 changed files with 54 additions and 20 deletions

View file

@ -28,11 +28,14 @@ void EmitVoid(EmitContext& ctx) {
}
void EmitReference(EmitContext&) {
NotImplemented();
// NotImplemented();
}
void EmitPhiMove(EmitContext& ctx, const IR::Value& phi, const IR::Value& value) {
NotImplemented();
if (phi == value) {
return;
}
ctx.Add("{}={};", ctx.reg_alloc.Consume(phi), ctx.reg_alloc.Consume(value));
}
void EmitBranch(EmitContext& ctx, std::string_view label) {