HomePhabricator

[Loop Predication] Teach LP about reverse loops

Description

[Loop Predication] Teach LP about reverse loops

Summary:
Currently, we only support predication for forward loops with step
of 1. This patch enables loop predication for reverse or
countdownLoops, which satisfy the following conditions:

  1. The step of the IV is -1.
  2. The loop has a singe latch as B(X) = X <pred>

latchLimit with pred as s> or u>

  1. The IV of the guard is the decrement

IV of the latch condition (Guard is: G(X) = X-1 u< guardLimit).

This patch was downstream for a while and is the last series of patches
that's from our LP implementation downstream.

Reviewers: apilipenko, mkazantsev, sanjoy

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D40353

Details

Committed
annatDec 4 2017, 7:11 AM
Differential Revision
D40353: [Loop Predication] Teach LP about reverse loops
Parents
rL319658: [OpenCL] Define __IMAGE_SUPPORT__ macro for SPIR
Branches
Unknown
Tags
Unknown