Olli Etuaho | 3cbb27a | 2016-07-14 11:55:48 +0300 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 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_SIMPLIFYLOOPCONDITIONS_H_ |
| 12 | #define COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_ |
| 13 | |
Jamie Madill | 45bcc78 | 2016-11-07 13:58:48 -0500 | [diff] [blame] | 14 | namespace sh |
| 15 | { |
Olli Etuaho | 3cbb27a | 2016-07-14 11:55:48 +0300 | [diff] [blame] | 16 | class TIntermNode; |
| 17 | class TSymbolTable; |
| 18 | |
| 19 | void SimplifyLoopConditions(TIntermNode *root, |
| 20 | unsigned int conditionsToSimplify, |
| 21 | unsigned int *temporaryIndex, |
| 22 | const TSymbolTable &symbolTable, |
| 23 | int shaderVersion); |
Jamie Madill | 45bcc78 | 2016-11-07 13:58:48 -0500 | [diff] [blame] | 24 | } // namespace sh |
Olli Etuaho | 3cbb27a | 2016-07-14 11:55:48 +0300 | [diff] [blame] | 25 | |
| 26 | #endif // COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_ |