Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/opt/simplification_pass.cpp')
-rw-r--r--source/opt/simplification_pass.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/opt/simplification_pass.cpp b/source/opt/simplification_pass.cpp
index 43ec15f80..dbda39728 100644
--- a/source/opt/simplification_pass.cpp
+++ b/source/opt/simplification_pass.cpp
@@ -69,12 +69,12 @@ bool SimplificationPass::SimplifyFunction(Function* function) {
&folder, &inst_seen, this](BasicBlock* bb) {
for (Instruction* inst = &*bb->begin(); inst; inst = inst->NextNode()) {
inst_seen.insert(inst);
- if (inst->opcode() == SpvOpPhi) {
+ if (inst->opcode() == spv::Op::OpPhi) {
process_phis.insert(inst);
}
bool is_foldable_copy =
- inst->opcode() == SpvOpCopyObject &&
+ inst->opcode() == spv::Op::OpCopyObject &&
context()->get_decoration_mgr()->HaveSubsetOfDecorations(
inst->result_id(), inst->GetSingleWordInOperand(0));
@@ -91,7 +91,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) {
AddNewOperands(inst, &inst_seen, &work_list);
- if (inst->opcode() == SpvOpCopyObject) {
+ if (inst->opcode() == spv::Op::OpCopyObject) {
context()->ReplaceAllUsesWithPredicate(
inst->result_id(), inst->GetSingleWordInOperand(0),
[](Instruction* user) {
@@ -104,7 +104,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) {
});
inst_to_kill.insert(inst);
in_work_list.insert(inst);
- } else if (inst->opcode() == SpvOpNop) {
+ } else if (inst->opcode() == spv::Op::OpNop) {
inst_to_kill.insert(inst);
in_work_list.insert(inst);
}
@@ -121,7 +121,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) {
inst_seen.insert(inst);
bool is_foldable_copy =
- inst->opcode() == SpvOpCopyObject &&
+ inst->opcode() == spv::Op::OpCopyObject &&
context()->get_decoration_mgr()->HaveSubsetOfDecorations(
inst->result_id(), inst->GetSingleWordInOperand(0));
@@ -130,7 +130,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) {
context()->AnalyzeUses(inst);
get_def_use_mgr()->ForEachUser(
inst, [&work_list, &in_work_list](Instruction* use) {
- if (!use->IsDecoration() && use->opcode() != SpvOpName &&
+ if (!use->IsDecoration() && use->opcode() != spv::Op::OpName &&
in_work_list.insert(use).second) {
work_list.push_back(use);
}
@@ -138,7 +138,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) {
AddNewOperands(inst, &inst_seen, &work_list);
- if (inst->opcode() == SpvOpCopyObject) {
+ if (inst->opcode() == spv::Op::OpCopyObject) {
context()->ReplaceAllUsesWithPredicate(
inst->result_id(), inst->GetSingleWordInOperand(0),
[](Instruction* user) {
@@ -150,7 +150,7 @@ bool SimplificationPass::SimplifyFunction(Function* function) {
});
inst_to_kill.insert(inst);
in_work_list.insert(inst);
- } else if (inst->opcode() == SpvOpNop) {
+ } else if (inst->opcode() == spv::Op::OpNop) {
inst_to_kill.insert(inst);
in_work_list.insert(inst);
}