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

Method GetFirstLoopInvariantOperand

source/opt/loop_peeling.cpp:861–872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

859}
860
861uint32_t LoopPeelingPass::LoopPeelingInfo::GetFirstLoopInvariantOperand(
862 Instruction* condition) const {
863 for (uint32_t i = 0; i < condition->NumInOperands(); i++) {
864 BasicBlock* bb =
865 context_->get_instr_block(condition->GetSingleWordInOperand(i));
866 if (bb && loop_->IsInsideLoop(bb)) {
867 return condition->GetSingleWordInOperand(i);
868 }
869 }
870
871 return 0;
872}
873
874uint32_t LoopPeelingPass::LoopPeelingInfo::GetFirstNonLoopInvariantOperand(
875 Instruction* condition) const {

Callers

nothing calls this directly

Calls 4

NumInOperandsMethod · 0.80
get_instr_blockMethod · 0.80
IsInsideLoopMethod · 0.45

Tested by

no test coverage detected