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

Method GetInductionVariables

source/opt/loop_descriptor.cpp:851–858  ·  view source on GitHub ↗

Returns the list of induction variables within the loop.

Source from the content-addressed store, hash-verified

849
850// Returns the list of induction variables within the loop.
851void Loop::GetInductionVariables(
852 std::vector<Instruction*>& induction_variables) const {
853 for (Instruction& inst : *loop_header_) {
854 if (inst.opcode() == spv::Op::OpPhi) {
855 induction_variables.push_back(&inst);
856 }
857 }
858}
859
860Instruction* Loop::FindConditionVariable(
861 const BasicBlock* condition_block) const {

Callers 11

AreCompatibleMethod · 0.80
IsLegalMethod · 0.80
IsSupportedLoopMethod · 0.80
UnrollMethod · 0.80
CopyBodyMethod · 0.80
CloseUnrolledLoopMethod · 0.80
LinkLastPhisToStartMethod · 0.80
CanPerformUnrollMethod · 0.80
FullyUnrollMethod · 0.80

Calls 2

opcodeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected