[PATCH] D64974: [MustExec][LICM] Refactor the first iteration condition check

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 00:16:13 PDT 2019


jdoerfert created this revision.
jdoerfert added reviewers: reames, fhahn, lebedev.ri, hfinkel, arsenm.
Herald added subscribers: asbirlea, bollu, hiraditya, wdng.
Herald added a project: LLVM.

This patch exposes components that allow to simplify conditions for the
first iteration of a loop. The logic was almost completely copied.
Slight modifications include:

- Use the loop predecessor instead of loop preheader.
- Try to simplify both sides of the ICmp.
- Do not give up if no PHI was found or the PHI was not in a header.

One test was improved, a proper negative example was added to keep
coverage high.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64974

Files:
  llvm/lib/Analysis/MustExecute.cpp
  llvm/test/Transforms/LICM/hoist-mustexec.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64974.210751.patch
Type: text/x-patch
Size: 6613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190719/15431ba7/attachment.bin>


More information about the llvm-commits mailing list