MCPcopy Create free account
hub / github.com/GoSSIP-SJTU/Armariris / TryTrivialLoopUnswitch

Method TryTrivialLoopUnswitch

lib/Transforms/Scalar/LoopUnswitch.cpp:865–1004  ·  view source on GitHub ↗

Check if the first non-constant condition starting from the loop header is a trivial unswitch condition: that is, a condition controls whether or not the loop does anything at all. If it is a trivial condition, unswitching produces no code duplications (equivalently, it produces a simpler loop and a new empty loop, which gets deleted). Therefore always unswitch trivial condition.

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 15

getTrueFunction · 0.85
getFalseFunction · 0.85
FindLIVLoopConditionFunction · 0.85
isTrivialLoopExitBlockFunction · 0.85
mayHaveSideEffectsMethod · 0.80
isUnconditionalMethod · 0.80
isConditionalMethod · 0.80
case_beginMethod · 0.80
case_endMethod · 0.80
getCaseSuccessorMethod · 0.80
getCaseValueMethod · 0.80
isUnswitchedMethod · 0.80

Tested by

no test coverage detected