Merge pull request #7262 from FernandoS27/Buffalo-buffalo-Buffalo-buffalo-buffalo
ShaderCache: Order Phi Arguments from farthest away to nearest.
This commit is contained in:
commit
7ce29ea74e
7 changed files with 68 additions and 3 deletions
|
@ -18,7 +18,7 @@ namespace Shader::Backend::GLASM {
|
|||
#define NotImplemented() throw NotImplementedException("GLASM instruction {}", __LINE__)
|
||||
|
||||
static void DefinePhi(EmitContext& ctx, IR::Inst& phi) {
|
||||
switch (phi.Arg(0).Type()) {
|
||||
switch (phi.Type()) {
|
||||
case IR::Type::U1:
|
||||
case IR::Type::U32:
|
||||
case IR::Type::F32:
|
||||
|
|
|
@ -68,7 +68,7 @@ void EmitPhi(EmitContext& ctx, IR::Inst& phi) {
|
|||
}
|
||||
if (!phi.Definition<Id>().is_valid) {
|
||||
// The phi node wasn't forward defined
|
||||
ctx.var_alloc.PhiDefine(phi, phi.Arg(0).Type());
|
||||
ctx.var_alloc.PhiDefine(phi, phi.Type());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ void EmitReference(EmitContext& ctx, const IR::Value& value) {
|
|||
|
||||
void EmitPhiMove(EmitContext& ctx, const IR::Value& phi_value, const IR::Value& value) {
|
||||
IR::Inst& phi{*phi_value.InstRecursive()};
|
||||
const auto phi_type{phi.Arg(0).Type()};
|
||||
const auto phi_type{phi.Type()};
|
||||
if (!phi.Definition<Id>().is_valid) {
|
||||
// The phi node wasn't forward defined
|
||||
ctx.var_alloc.PhiDefine(phi, phi_type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue