summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2016-07-12 18:45:51 +0000
committerDehao Chen <dehao@google.com>2016-07-12 18:45:51 +0000
commit2ba4d7a7ea4a158b4b93299e5ca62ac165039269 (patch)
tree1eb37ae729ab1de1f416627d77523c95db2d2df2 /include
parent1efbc7fef51e7aa8cd30acea8f2c453a2ed60a29 (diff)
[PM] Port LoopIdiomRecognize Pass to new PM
Summary: Port LoopIdiomRecognize Pass to new PM Reviewers: davidxl Subscribers: davide, sanjoy, mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D22250 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/InitializePasses.h2
-rw-r--r--include/llvm/Transforms/Scalar/LoopIdiomRecognize.h31
2 files changed, 32 insertions, 1 deletions
diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h
index b17a216d328..e7504de68bb 100644
--- a/include/llvm/InitializePasses.h
+++ b/include/llvm/InitializePasses.h
@@ -177,7 +177,7 @@ void initializeLoopDataPrefetchPass(PassRegistry&);
void initializeLoopDeletionPass(PassRegistry&);
void initializeLoopDistributePass(PassRegistry&);
void initializeLoopExtractorPass(PassRegistry&);
-void initializeLoopIdiomRecognizePass(PassRegistry&);
+void initializeLoopIdiomRecognizeLegacyPassPass(PassRegistry&);
void initializeLoopInfoWrapperPassPass(PassRegistry&);
void initializeLoopInstSimplifyPass(PassRegistry&);
void initializeLoopInterchangePass(PassRegistry &);
diff --git a/include/llvm/Transforms/Scalar/LoopIdiomRecognize.h b/include/llvm/Transforms/Scalar/LoopIdiomRecognize.h
new file mode 100644
index 00000000000..cc66156fba8
--- /dev/null
+++ b/include/llvm/Transforms/Scalar/LoopIdiomRecognize.h
@@ -0,0 +1,31 @@
+//===- LoopIdiomRecognize.h - Loop Idiom Recognize Pass -------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This pass implements an idiom recognizer that transforms simple loops into a
+// non-loop form. In cases that this kicks in, it can be a significant
+// performance win.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_TRANSFORMS_SCALAR_LOOPIDIOMRECOGNIZE_H
+#define LLVM_TRANSFORMS_SCALAR_LOOPIDIOMRECOGNIZE_H
+
+#include "llvm/Analysis/LoopInfo.h"
+#include "llvm/IR/PassManager.h"
+
+namespace llvm {
+
+/// Performs Loop Idiom Recognize Pass.
+class LoopIdiomRecognizePass : public PassInfoMixin<LoopIdiomRecognizePass> {
+public:
+ PreservedAnalyses run(Loop &L, AnalysisManager<Loop> &AM);
+};
+} // end namespace llvm
+
+#endif // LLVM_TRANSFORMS_SCALAR_LOOPIDIOMRECOGNIZE_H