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

Method ShouldSplitLoop

source/opt/loop_fission.cpp:444–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444bool LoopFissionPass::ShouldSplitLoop(const Loop& loop, IRContext* c) {
445 LivenessAnalysis* analysis = c->GetLivenessAnalysis();
446
447 RegisterLiveness::RegionRegisterLiveness liveness{};
448
449 Function* function = loop.GetHeaderBlock()->GetParent();
450 analysis->Get(function)->ComputeLoopRegisterPressure(loop, &liveness);
451
452 return split_criteria_(liveness);
453}
454
455Pass::Status LoopFissionPass::Process() {
456 bool changed = false;

Callers

nothing calls this directly

Calls 5

GetLivenessAnalysisMethod · 0.80
GetParentMethod · 0.45
GetHeaderBlockMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected