[LoopExtractor] Convert LoopExtractor from LoopPass to ModulePass
authorEhud Katz <ehudkatz@gmail.com>
Sun, 9 Feb 2020 10:25:21 +0000 (12:25 +0200)
committerEhud Katz <ehudkatz@gmail.com>
Sun, 9 Feb 2020 10:25:21 +0000 (12:25 +0200)
commit3b70ee27a5032a52fc9502541c70b5e0e6b29dfa
tree98e00530150ceb91981419532d3055d6f42da450
parent10c7b7708b32960c82ad295484ae94ffb5b02333
[LoopExtractor] Convert LoopExtractor from LoopPass to ModulePass

The LoopExtractor created new functions (by definition), which violates
the restrictions of a LoopPass.
The correct implementation of this pass should be as a ModulePass.
Includes reverting rL82990 implications on the LoopExtractor.

Fixes PR3082 and PR8929.

Differential Revision: https://reviews.llvm.org/D69069
llvm/lib/Transforms/IPO/LoopExtractor.cpp
llvm/test/Feature/optnone-opt.ll
llvm/test/Transforms/CodeExtractor/LoopExtractor.ll [new file with mode: 0644]
llvm/test/Transforms/CodeExtractor/LoopExtractor_crash.ll [new file with mode: 0644]
llvm/test/Transforms/CodeExtractor/LoopExtractor_infinite.ll [new file with mode: 0644]
llvm/test/Transforms/CodeExtractor/LoopExtractor_min_wrapper.ll [new file with mode: 0644]