#include "compiler/translator/tree_ops/SimplifyLoopConditions.h"
#include "compiler/translator/StaticType.h"
#include "compiler/translator/tree_util/IntermNodePatternMatcher.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
namespace sh
{
namespace
{
struct LoopInfo
{ … };
class SimplifyLoopConditionsTraverser : public TLValueTrackingTraverser
{ … };
SimplifyLoopConditionsTraverser::SimplifyLoopConditionsTraverser(
const IntermNodePatternMatcher *conditionsToSimplify,
TSymbolTable *symbolTable)
: … { … }
bool SimplifyLoopConditionsTraverser::visitUnary(Visit visit, TIntermUnary *node)
{ … }
bool SimplifyLoopConditionsTraverser::visitBinary(Visit visit, TIntermBinary *node)
{ … }
bool SimplifyLoopConditionsTraverser::visitAggregate(Visit visit, TIntermAggregate *node)
{ … }
bool SimplifyLoopConditionsTraverser::visitTernary(Visit visit, TIntermTernary *node)
{ … }
bool SimplifyLoopConditionsTraverser::visitDeclaration(Visit visit, TIntermDeclaration *node)
{ … }
bool SimplifyLoopConditionsTraverser::visitBranch(Visit visit, TIntermBranch *node)
{ … }
static TIntermBlock *CreateFromBody(TIntermLoop *node, bool *bodyEndsInBranchOut)
{ … }
void SimplifyLoopConditionsTraverser::traverseLoop(TIntermLoop *node)
{ … }
}
bool SimplifyLoopConditions(TCompiler *compiler, TIntermNode *root, TSymbolTable *symbolTable)
{ … }
bool SimplifyLoopConditions(TCompiler *compiler,
TIntermNode *root,
unsigned int conditionsToSimplifyMask,
TSymbolTable *symbolTable)
{ … }
}