SPU LLVM: Avoid sinking stores out of non-loops
This commit is contained in:
@@ -2340,6 +2340,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool has_gpr_barriers_in_the_way = false;
|
bool has_gpr_barriers_in_the_way = false;
|
||||||
|
bool potential_loop = false;
|
||||||
|
|
||||||
for (auto [a2, b2] : sucs)
|
for (auto [a2, b2] : sucs)
|
||||||
{
|
{
|
||||||
@@ -2351,6 +2352,7 @@ public:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
potential_loop = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2390,6 +2392,7 @@ public:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
potential_loop = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2424,6 +2427,12 @@ public:
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!potential_loop)
|
||||||
|
{
|
||||||
|
spu_log.trace("Avoided postponing r%u store from block 0x%x (not loop)", i, block_q[bi].first);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
for (auto [a2, b2] : sucs)
|
for (auto [a2, b2] : sucs)
|
||||||
{
|
{
|
||||||
if (b2 != bqbi)
|
if (b2 != bqbi)
|
||||||
|
|||||||
Reference in New Issue
Block a user