[LICM] Allow AliasSetMap to contain top-level loops.
authorFlorian Hahn <flo@fhahn.com>
Tue, 14 May 2019 19:41:36 +0000 (19:41 +0000)
committerFlorian Hahn <flo@fhahn.com>
Tue, 14 May 2019 19:41:36 +0000 (19:41 +0000)
commit53c9d585b5b12f72c21ac85baa410a565f4cfbe7
treecc9c9bb0c6f573307e8d44674115215c0c3b4a20
parent030b17db665a37ce4a359416c4c3ebe1f0354ea2
[LICM] Allow AliasSetMap to contain top-level loops.

When an outer loop gets deleted by a different pass, before LICM visits
it, we cannot clean up its sub-loops in AliasSetMap, because at the
point we receive the deleteAnalysisLoop callback for the outer loop, the loop
object is already invalid and we cannot access its sub-loops any longer.

Reviewers: asbirlea, sanjoy, chandlerc

Reviewed By: asbirlea

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

llvm-svn: 360704
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/test/Transforms/LICM/outer-loop-deleted-before-licm.ll [new file with mode: 0644]