From 113b2ffd353acc93cb61b4e7b2daa3b5acf78ac6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 20 Jun 2001 19:26:21 +0000 Subject: [PATCH] Add an optimization stub git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Optimizations/AllOpts.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/include/llvm/Optimizations/AllOpts.h b/include/llvm/Optimizations/AllOpts.h index bfb7b5768e2..3ab7224bc7e 100644 --- a/include/llvm/Optimizations/AllOpts.h +++ b/include/llvm/Optimizations/AllOpts.h @@ -32,8 +32,8 @@ static inline bool ApplyOptToAllMethods(Module *C, bool (*Opt)(Method*)) { // bool DoDeadCodeElimination(Method *M); // DCE a method -bool DoRemoveUnusedConstants(SymTabValue *S); // RUC a method or class -bool DoDeadCodeElimination(Module *C); // DCE & RUC a whole class +bool DoRemoveUnusedConstants(SymTabValue *S); // RUC a method or module +bool DoDeadCodeElimination(Module *C); // DCE & RUC a whole module //===----------------------------------------------------------------------===// // Constant Propogation Pass @@ -92,4 +92,16 @@ static inline bool DoSymbolStripping(Module *M) { // bool DoFullSymbolStripping(Module *M); + +//===----------------------------------------------------------------------===// +// Induction Variable Cannonicalization +// + +// DoInductionVariableCannonicalize - Simplify induction variables in loops +// +bool DoInductionVariableCannonicalize(Method *M); +static inline bool DoInductionVariableCannonicalize(Module *M) { + return ApplyOptToAllMethods(M, DoInductionVariableCannonicalize); +} + #endif -- 2.34.1