2 // Copyright (c) 2011 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.
7 #include "compiler/intermediate.h"
9 struct TLoopIndexInfo {
22 void FillLoopIndexInfo(TIntermLoop* node, TLoopIndexInfo& info);
24 // Update the info.currentValue for the next loop iteration.
27 // Return false if loop condition is no longer satisfied.
28 bool SatisfiesLoopCondition();
30 // Check if the symbol is the index of a loop that's unrolled.
31 bool NeedsToReplaceSymbolWithValue(TIntermSymbol* symbol);
33 // Return the current value of a given loop index symbol.
34 int GetLoopIndexValue(TIntermSymbol* symbol);
36 void Push(TLoopIndexInfo& info);
40 int getLoopIncrement(TIntermLoop* node);
42 int evaluateIntConstant(TIntermConstantUnion* node);
44 TVector<TLoopIndexInfo> mLoopIndexStack;