OSDN Git Service

[LegacyPM] Make the 'addLoop' method accept a loop to add rather than
authorChandler Carruth <chandlerc@gmail.com>
Thu, 25 May 2017 03:01:31 +0000 (03:01 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 25 May 2017 03:01:31 +0000 (03:01 +0000)
commit9f6280a85bdd9974c16ab79ffe51bf6b66aced58
treecd51075995c657c31a3e1d90c1736e2d2af570fa
parentebc10e3a25607724b47b92f770835357fad18273
[LegacyPM] Make the 'addLoop' method accept a loop to add rather than
having it internally allocate the loop.

This is a much more flexible API and necessary in the new loop unswitch
to reasonably support both new and old PMs in common code. It also just
seems like a cleaner separation of concerns.

NFC, this should just be a pure refactoring.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303834 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/LoopPass.h
lib/Analysis/LoopPass.cpp
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
lib/Transforms/Scalar/LoopUnswitch.cpp