blob: a2fcf8f326b323a47d568f96d9d5bcd71345dc21 [file] [log] [blame]
Olli Etuaho3cbb27a2016-07-14 11:55:48 +03001//
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 Madill45bcc782016-11-07 13:58:48 -050014namespace sh
15{
Olli Etuaho3cbb27a2016-07-14 11:55:48 +030016class TIntermNode;
17class TSymbolTable;
Olli Etuaho4dd06d52017-07-05 12:41:06 +030018class TSymbolUniqueId;
Olli Etuaho3cbb27a2016-07-14 11:55:48 +030019
20void SimplifyLoopConditions(TIntermNode *root,
21 unsigned int conditionsToSimplify,
Olli Etuaho4dd06d52017-07-05 12:41:06 +030022 TSymbolUniqueId *temporaryId,
Olli Etuaho3cbb27a2016-07-14 11:55:48 +030023 const TSymbolTable &symbolTable,
24 int shaderVersion);
Jamie Madill45bcc782016-11-07 13:58:48 -050025} // namespace sh
Olli Etuaho3cbb27a2016-07-14 11:55:48 +030026
27#endif // COMPILER_TRANSLATOR_SIMPLIFYLOOPCONDITIONS_H_