| 260 | } |
| 261 | |
| 262 | bool BlockIsInLoopContinueConstruct(opt::IRContext* context, uint32_t block_id, |
| 263 | uint32_t maybe_loop_header_id) { |
| 264 | // We deem a block to be part of a loop's continue construct if the loop's |
| 265 | // continue target dominates the block. |
| 266 | auto containing_construct_block = context->cfg()->block(maybe_loop_header_id); |
| 267 | if (containing_construct_block->IsLoopHeader()) { |
| 268 | auto continue_target = containing_construct_block->ContinueBlockId(); |
| 269 | if (context->GetDominatorAnalysis(containing_construct_block->GetParent()) |
| 270 | ->Dominates(continue_target, block_id)) { |
| 271 | return true; |
| 272 | } |
| 273 | } |
| 274 | return false; |
| 275 | } |
| 276 | |
| 277 | opt::BasicBlock::iterator GetIteratorForInstruction( |
| 278 | opt::BasicBlock* block, const opt::Instruction* inst) { |
no test coverage detected