[PATCH] D17370: [LICM] Break the assumption that the sub loops cannot be modified by other loop passes

Haicheng Wu via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 22:34:55 PST 2016


haicheng created this revision.
haicheng added reviewers: mssimpso, mcrosier, gberry.
haicheng added a subscriber: llvm-commits.
haicheng set the repository for this revision to rL LLVM.
Herald added a subscriber: mcrosier.

LICM assumes that the sub loops cannot be modified by other loop passes (See the deleted comment starting with "What if").  It is true for the current loop optimization pipeline.  However, if the pipeline is changed, the assumption may not be true (e.g. test/Transforms/LICM/AliasSetMemSet.ll which is discussed in this [[ http://lists.llvm.org/pipermail/llvm-dev/2016-February/095446.html | thread ]]).

This patch first tests if there are more than one loop passes run together.  If it is true, it calculates the AST from the scratch without using the LoopToAliasSetMap cache.  This patch has no impact on either function or compilation time for the current loop optimization pipeline.

Repository:
  rL LLVM

http://reviews.llvm.org/D17370

Files:
  lib/Transforms/Scalar/LICM.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17370.48279.patch
Type: text/x-patch
Size: 3637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160218/efda204a/attachment.bin>


More information about the llvm-commits mailing list