Expose InsertPreheaderForLoop from LoopSimplify to other passes

Other passes, PPC counter-loop formation for example, also need to add loop
preheaders outside of the regular loop simplification pass. This makes
InsertPreheaderForLoop a global function so that it can be used by other
passes.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182299 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Hal Finkel
2013-05-20 16:47:07 +00:00
parent 9b39c726a0
commit fc32605ff3
2 changed files with 38 additions and 11 deletions

View File

@ -0,0 +1,26 @@
//===- llvm/Transforms/Utils/LoopSimplify.h - Loop utilities -*- C++ -*-======//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines some loop transformation utilities.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_UTILS_LOOPSIMPLIFY_H
#define LLVM_TRANSFORMS_UTILS_LOOPSIMPLIFY_H
namespace llvm {
class Loop;
class Pass;
BasicBlock *InsertPreheaderForLoop(Loop *L, Pass *P);
}
#endif