1 //===- llvm/Transforms/Utils/UnrollLoop.h - Unrolling utilities -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines some loop unrolling utilities. It does not define any
11 // actual pass or policy, but provides a single function to perform loop
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_TRANSFORMS_UTILS_UNROLLLOOP_H
17 #define LLVM_TRANSFORMS_UTILS_UNROLLLOOP_H
19 #include "llvm/ADT/StringRef.h"
23 class AssumptionCache;
30 class ScalarEvolution;
32 bool UnrollLoop(Loop *L, unsigned Count, unsigned TripCount, bool AllowRuntime,
33 bool AllowExpensiveTripCount, unsigned TripMultiple,
34 LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT,
35 AssumptionCache *AC, bool PreserveLCSSA);
37 bool UnrollRuntimeLoopProlog(Loop *L, unsigned Count,
38 bool AllowExpensiveTripCount, LoopInfo *LI,
39 ScalarEvolution *SE, DominatorTree *DT,
42 MDNode *GetUnrollMetadata(MDNode *LoopID, StringRef Name);