MCPcopy Create free account
hub / github.com/KhronosGroup/glslang / visitLoop

Method visitLoop

glslang/MachineIndependent/intermOut.cpp:1296–1342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1294}
1295
1296bool TOutputTraverser::visitLoop(TVisit /* visit */, TIntermLoop* node)
1297{
1298 TInfoSink& out = infoSink;
1299
1300 OutputTreeText(out, node, depth);
1301
1302 out.debug << "Loop with condition ";
1303 if (! node->testFirst())
1304 out.debug << "not ";
1305 out.debug << "tested first";
1306
1307 if (node->getUnroll())
1308 out.debug << ": Unroll";
1309 if (node->getDontUnroll())
1310 out.debug << ": DontUnroll";
1311 if (node->getLoopDependency()) {
1312 out.debug << ": Dependency ";
1313 out.debug << node->getLoopDependency();
1314 }
1315 out.debug << "\n";
1316
1317 ++depth;
1318
1319 OutputTreeText(infoSink, node, depth);
1320 if (node->getTest()) {
1321 out.debug << "Loop Condition\n";
1322 node->getTest()->traverse(this);
1323 } else
1324 out.debug << "No loop condition\n";
1325
1326 OutputTreeText(infoSink, node, depth);
1327 if (node->getBody()) {
1328 out.debug << "Loop Body\n";
1329 node->getBody()->traverse(this);
1330 } else
1331 out.debug << "No loop body\n";
1332
1333 if (node->getTerminal()) {
1334 OutputTreeText(infoSink, node, depth);
1335 out.debug << "Loop Terminal Expression\n";
1336 node->getTerminal()->traverse(this);
1337 }
1338
1339 --depth;
1340
1341 return false;
1342}
1343
1344bool TOutputTraverser::visitBranch(TVisit /* visit*/, TIntermBranch* node)
1345{

Callers 1

traverseMethod · 0.45

Calls 9

OutputTreeTextFunction · 0.85
testFirstMethod · 0.80
getUnrollMethod · 0.80
getDontUnrollMethod · 0.80
getLoopDependencyMethod · 0.80
getTestMethod · 0.80
traverseMethod · 0.80
getTerminalMethod · 0.80
getBodyMethod · 0.45

Tested by

no test coverage detected