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

Method MoveBasicBlockToAfter

source/opt/function.h:261–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261inline void Function::MoveBasicBlockToAfter(uint32_t id, BasicBlock* ip) {
262 std::unique_ptr<BasicBlock> block_to_move = std::move(*FindBlock(id).Get());
263 blocks_.erase(std::find(std::begin(blocks_), std::end(blocks_), nullptr));
264
265 assert(block_to_move->GetParent() == ip->GetParent() &&
266 "Both blocks have to be in the same function.");
267
268 InsertBasicBlockAfter(std::move(block_to_move), ip);
269}
270
271inline void Function::RemoveEmptyBlocks() {
272 auto first_empty =

Callers 4

FuseMethod · 0.80
FixBlockOrderMethod · 0.80
ApplyMethod · 0.80
ApplyMethod · 0.80

Calls 4

findFunction · 0.85
GetMethod · 0.45
eraseMethod · 0.45
GetParentMethod · 0.45

Tested by

no test coverage detected