mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-22 11:40:05 +00:00
Ignore NonSemanticInstructions (#5171)
Fix #5163. Ignore NonSemanticInstructions in DoDeadOutputStoresElimination and ComputeLiveness.
This commit is contained in:
parent
32a4d840bb
commit
b4e0850ef7
@ -219,7 +219,7 @@ Pass::Status EliminateDeadOutputStoresPass::DoDeadOutputStoreElimination() {
|
||||
var_id, [this, &var, is_builtin](Instruction* user) {
|
||||
auto op = user->opcode();
|
||||
if (op == spv::Op::OpEntryPoint || op == spv::Op::OpName ||
|
||||
op == spv::Op::OpDecorate)
|
||||
op == spv::Op::OpDecorate || user->IsNonSemanticInstruction())
|
||||
return;
|
||||
if (is_builtin)
|
||||
KillAllDeadStoresOfBuiltinRef(user, &var);
|
||||
|
@ -309,7 +309,7 @@ void LivenessManager::ComputeLiveness() {
|
||||
def_use_mgr->ForEachUser(var_id, [this, &var](Instruction* user) {
|
||||
auto op = user->opcode();
|
||||
if (op == spv::Op::OpEntryPoint || op == spv::Op::OpName ||
|
||||
op == spv::Op::OpDecorate) {
|
||||
op == spv::Op::OpDecorate || user->IsNonSemanticInstruction()) {
|
||||
return;
|
||||
}
|
||||
MarkRefLive(user, &var);
|
||||
|
Loading…
Reference in New Issue
Block a user