25 ASSERT(declSeq.size() == 1);
28 ASSERT(declInit->getLeft());
52 ASSERT(declSeq.size() == 1);
65 info.
initValue = evaluateIntConstant(initNode);
83 ASSERT(mLoopIndexStack.size() > 0);
84 TLoopIndexInfo& info = mLoopIndexStack[mLoopIndexStack.size() - 1];
85 info.currentValue += info.incrementValue;
90 ASSERT(mLoopIndexStack.size() > 0);
91 TLoopIndexInfo& info = mLoopIndexStack[mLoopIndexStack.size() - 1];
95 return (info.currentValue == info.stopValue);
97 return (info.currentValue != info.stopValue);
99 return (info.currentValue < info.stopValue);
101 return (info.currentValue > info.stopValue);
103 return (info.currentValue <= info.stopValue);
105 return (info.currentValue >= info.stopValue);
115 i != mLoopIndexStack.end();
117 if (
i->id == symbol->
getId())
126 i != mLoopIndexStack.end();
128 if (
i->id == symbol->
getId())
129 return i->currentValue;
137 mLoopIndexStack.push_back(info);
142 mLoopIndexStack.pop_back();
151 IntegerForLoopUnrollMarker
marker;
155 int ForLoopUnroll::getLoopIncrement(
TIntermLoop* node)
175 }
else if (binOp !=
NULL) {
197 increment = evaluateIntConstant(incrementNode);
201 increment = - evaluateIntConstant(incrementNode);
virtual TIntermBinary * getAsBinaryNode()
TIntermSequence & getSequence()
TIntermTyped * getCondition()
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
virtual TIntermAggregate * getAsAggregate()
virtual TIntermSymbol * getAsSymbolNode()
TIntermTyped * getRight() const
static void init(struct bs2b *bs2b)
TBasicType getBasicType() const
virtual TIntermConstantUnion * getAsConstantUnion()
virtual TIntermBinary * getAsBinaryNode()
void FillLoopIndexInfo(TIntermLoop *node, TLoopIndexInfo &info)
virtual TIntermConstantUnion * getAsConstantUnion()
#define ASSERT(expression)
int GetLoopIndexValue(TIntermSymbol *symbol)
virtual void traverse(TIntermTraverser *)=0
virtual TIntermUnary * getAsUnaryNode()
ConstantUnion * getUnionArrayPointer() const
static void MarkForLoopsWithIntegerIndicesForUnrolling(TIntermNode *root)
int getIConst(int index) const
virtual bool visitLoop(Visit visit, TIntermLoop *)
void Push(TLoopIndexInfo &info)
TIntermTyped * getExpression()
void setUnrollFlag(bool flag)
bool SatisfiesLoopCondition()
bool NeedsToReplaceSymbolWithValue(TIntermSymbol *symbol)
virtual TIntermAggregate * getAsAggregate()
TLoopType getType() const