HomePhabricator

[LOOPINFO] Introduce the loop guard API.

Description

[LOOPINFO] Introduce the loop guard API.
Summary:
This is the first patch for the loop guard. We introduced
getLoopGuardBranch() and isGuarded().
This currently only works on simplified loop, as it requires a preheader
and a latch to identify the guard.
It will work on loops of the form:
/ GuardBB:
/ br cond1, Preheader, ExitSucc <== GuardBranch
/ Preheader:
/ br Header
/ Header:
/ ...
/ br Latch
/ Latch:
/ br cond2, Header, ExitBlock
/ ExitBlock:
/ br ExitSucc
/ ExitSucc:
Prior discussions leading upto the decision to introduce the loop guard
API: http://lists.llvm.org/pipermail/llvm-dev/2019-May/132607.html
Reviewer: reames, kbarton, hfinkel, jdoerfert, Meinersbur, dmgreen
Reviewed By: reames
Subscribers: wuzish, hiraditya, jsji, llvm-commits, bmahjour, etiotto
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D63885

Details

Committed
whitneytJul 25 2019, 9:13 AM
Reviewer
reames
Differential Revision
D63885: [LOOPINFO] Introduce the loop guard API.
Parents
rL367032: Allow prefetching from non-zero address spaces
Branches
Unknown
Tags
Unknown