summaryrefslogtreecommitdiff
path: root/source/opt/mem_pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/opt/mem_pass.cpp')
-rw-r--r--source/opt/mem_pass.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/opt/mem_pass.cpp b/source/opt/mem_pass.cpp
index 39964777..86b84a0a 100644
--- a/source/opt/mem_pass.cpp
+++ b/source/opt/mem_pass.cpp
@@ -137,11 +137,7 @@ bool MemPass::HasOnlyNamesAndDecorates(uint32_t id) const {
}
void MemPass::KillAllInsts(ir::BasicBlock* bp, bool killLabel) {
- bp->ForEachInst([this, killLabel](ir::Instruction* ip) {
- if (killLabel || ip->opcode() != SpvOpLabel) {
- context()->KillInst(ip);
- }
- });
+ bp->KillAllInsts(killLabel);
}
bool MemPass::HasLoads(uint32_t varId) const {