From 4b1577a0cbcfdbdbbe540b7ba91945b70ac7fb46 Mon Sep 17 00:00:00 2001 From: Andrey Tuganov Date: Thu, 5 Oct 2017 16:26:09 -0400 Subject: [PATCH] Remove duplicate dead branch elim pass declaration The function had two declarations in the same header with somewhat different comments. --- include/spirv-tools/optimizer.hpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/include/spirv-tools/optimizer.hpp b/include/spirv-tools/optimizer.hpp index 54e1561..7e1db25 100644 --- a/include/spirv-tools/optimizer.hpp +++ b/include/spirv-tools/optimizer.hpp @@ -260,6 +260,9 @@ Optimizer::PassToken CreateLocalSingleBlockLoadStoreElimPass(); // BranchConditionals with constant condition and convert to a Branch to // the indicated label. It will delete resulting dead blocks. // +// For all phi functions in merge block, replace all uses with the id +// corresponding to the living predecessor. +// // This pass only works on shaders (guaranteed to have structured control // flow). Note that some such branches and blocks may be left to avoid // creating invalid control flow. Improving this is left to future work. @@ -333,17 +336,6 @@ Optimizer::PassToken CreateLocalSingleStoreElimPass(); // converted to inserts and extracts and local loads and stores are eliminated. Optimizer::PassToken CreateInsertExtractElimPass(); -// Create dead branch elimination pass. -// For each entry point function, this pass will look for BranchConditionals -// with constant condition and convert to a branch. The BranchConditional must -// be preceeded by OpSelectionMerge. For all phi functions in merge block, -// replace all uses with the id corresponding to the living predecessor. -// -// This pass is most effective when preceeded by passes which eliminate -// local loads and stores, effectively propagating constant values where -// possible. -Optimizer::PassToken CreateDeadBranchElimPass(); - // Creates a pass to consolidate uniform references. // For each entry point function in the module, first change all constant index // access chain loads into equivalent composite extracts. Then consolidate -- 2.7.4