[PATCH] D35858: [RFC] [LLVM] [LazyValueInfo] Introduce getRecurringEdgeValue to handle simple recurrence

Hongbin Zheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 14:52:56 PDT 2017


etherzhhb created this revision.

Teach LazyValueInfo to handle simple patterns on the PHINodes, including:

1. Induction variable of natural loop that increased by 1
2. select (phi (init, select)) generated from linear search

This is accomplished by computing the value of PHINode recurring edge based on mathematical fixed-point. We will fallback to getEdgeValue if we cannot handle the recurring edge.

PS: How should I add unittest for this? since it is "lazy". maybe I should come back with a LazyValueInfo printer


Repository:
  rL LLVM

https://reviews.llvm.org/D35858

Files:
  lib/Analysis/LazyValueInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35858.108162.patch
Type: text/x-patch
Size: 6583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170725/39644e2c/attachment.bin>


More information about the llvm-commits mailing list