diff options
author | Adam Nemet <anemet@apple.com> | 2016-03-10 23:54:39 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2016-03-10 23:54:39 +0000 |
commit | efb234135c9254f9a6d28ef571d52b56ef72ebcf (patch) | |
tree | 1d8f48d306a96106250e413fbab0a2cc5e6ec117 /llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp | |
parent | 42e09eb022da6f9bef61c36b35341ddbe728dced (diff) | |
download | llvm-efb234135c9254f9a6d28ef571d52b56ef72ebcf.zip llvm-efb234135c9254f9a6d28ef571d52b56ef72ebcf.tar.gz llvm-efb234135c9254f9a6d28ef571d52b56ef72ebcf.tar.bz2 |
[LLE] Add missed LoopSimplify dependence
The code assumed that we always had a preheader without making the pass
dependent on LoopSimplify.
Thanks to Mattias Eriksson V for reporting this.
llvm-svn: 263173
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp b/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp index e441911..a048690 100644 --- a/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp +++ b/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp @@ -28,6 +28,7 @@ #include "llvm/IR/Module.h" #include "llvm/Pass.h" #include "llvm/Support/Debug.h" +#include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/LoopVersioning.h" #include <forward_list> @@ -557,6 +558,7 @@ public: } void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addRequiredID(LoopSimplifyID); AU.addRequired<LoopInfoWrapperPass>(); AU.addPreserved<LoopInfoWrapperPass>(); AU.addRequired<LoopAccessAnalysis>(); @@ -577,6 +579,7 @@ INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass) INITIALIZE_PASS_DEPENDENCY(LoopAccessAnalysis) INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass) +INITIALIZE_PASS_DEPENDENCY(LoopSimplify) INITIALIZE_PASS_END(LoopLoadElimination, LLE_OPTION, LLE_name, false, false) namespace llvm { |