1 // 2 // Copyright 2016 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // SimplifyLoopConditions is an AST traverser that converts loop conditions and loop expressions 7 // to regular statements inside the loop. This way further transformations that generate statements 8 // from loop conditions and loop expressions work correctly. 9 // 10 11 #ifndef COMPILER_TRANSLATOR_TREEOPS_SIMPLIFYLOOPCONDITIONS_H_ 12 #define COMPILER_TRANSLATOR_TREEOPS_SIMPLIFYLOOPCONDITIONS_H_ 13 14 #include "common/angleutils.h" 15 16 namespace sh 17 { 18 class TCompiler; 19 class TIntermNode; 20 class TSymbolTable; 21 22 [[nodiscard]] bool SimplifyLoopConditions(TCompiler *compiler, 23 TIntermNode *root, 24 TSymbolTable *symbolTable); 25 26 [[nodiscard]] bool SimplifyLoopConditions(TCompiler *compiler, 27 TIntermNode *root, 28 unsigned int conditionsToSimplify, 29 TSymbolTable *symbolTable); 30 } // namespace sh 31 32 #endif // COMPILER_TRANSLATOR_TREEOPS_SIMPLIFYLOOPCONDITIONS_H_ 33