MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / AddBlocksToLoop

Method AddBlocksToLoop

source/opt/loop_unroller.cpp:985–993  ·  view source on GitHub ↗

Adds the blocks_to_add_ to both the loop and to the parent.

Source from the content-addressed store, hash-verified

983
984// Adds the blocks_to_add_ to both the loop and to the parent.
985void LoopUnrollerUtilsImpl::AddBlocksToLoop(Loop* loop) const {
986 // Add the blocks to this loop.
987 for (auto& block_itr : blocks_to_add_) {
988 loop->AddBasicBlock(block_itr.get());
989 }
990
991 // Add the blocks to the parent as well.
992 if (loop->GetParent()) AddBlocksToLoop(loop->GetParent());
993}
994
995void LoopUnrollerUtilsImpl::LinkLastPhisToStart(Loop* loop) const {
996 std::vector<Instruction*> inductions;

Callers

nothing calls this directly

Calls 3

getMethod · 0.80
AddBasicBlockMethod · 0.45
GetParentMethod · 0.45

Tested by

no test coverage detected