mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-24 13:33:37 +02:00
3b9497477f
LoopUnroll is a loop pass, so the analysis of OptimizationRemarkEmitter is added to the common function analysis passes that loop passes depend on. The BFI and indirectly BPI used in this pass is computed lazily so no overhead should be observed unless -pass-remarks-with-hotness is used. This is how the patch affects the O3 pipeline: Dominator Tree Construction Natural Loop Information Canonicalize natural loops Loop-Closed SSA Form Pass Basic Alias Analysis (stateless AA impl) Function Alias Analysis Results Scalar Evolution Analysis + Lazy Branch Probability Analysis + Lazy Block Frequency Analysis + Optimization Remark Emitter Loop Pass Manager Rotate Loops Loop Invariant Code Motion Unswitch loops Simplify the CFG Dominator Tree Construction Basic Alias Analysis (stateless AA impl) Function Alias Analysis Results Combine redundant instructions Natural Loop Information Canonicalize natural loops Loop-Closed SSA Form Pass Scalar Evolution Analysis + Lazy Branch Probability Analysis + Lazy Block Frequency Analysis + Optimization Remark Emitter Loop Pass Manager Induction Variable Simplification Recognize loop idioms Delete dead loops Unroll loops ... llvm-svn: 277203
49 lines
1.6 KiB
C++
49 lines
1.6 KiB
C++
//===- llvm/Transforms/Utils/UnrollLoop.h - Unrolling 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 unrolling utilities. It does not define any
|
|
// actual pass or policy, but provides a single function to perform loop
|
|
// unrolling.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TRANSFORMS_UTILS_UNROLLLOOP_H
|
|
#define LLVM_TRANSFORMS_UTILS_UNROLLLOOP_H
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class StringRef;
|
|
class AssumptionCache;
|
|
class DominatorTree;
|
|
class Loop;
|
|
class LoopInfo;
|
|
class LPPassManager;
|
|
class MDNode;
|
|
class Pass;
|
|
class OptimizationRemarkEmitter;
|
|
class ScalarEvolution;
|
|
|
|
bool UnrollLoop(Loop *L, unsigned Count, unsigned TripCount, bool Force,
|
|
bool AllowRuntime, bool AllowExpensiveTripCount,
|
|
unsigned TripMultiple, LoopInfo *LI, ScalarEvolution *SE,
|
|
DominatorTree *DT, AssumptionCache *AC,
|
|
OptimizationRemarkEmitter *ORE, bool PreserveLCSSA);
|
|
|
|
bool UnrollRuntimeLoopRemainder(Loop *L, unsigned Count,
|
|
bool AllowExpensiveTripCount,
|
|
bool UseEpilogRemainder, LoopInfo *LI,
|
|
ScalarEvolution *SE, DominatorTree *DT,
|
|
bool PreserveLCSSA);
|
|
|
|
MDNode *GetUnrollMetadata(MDNode *LoopID, StringRef Name);
|
|
}
|
|
|
|
#endif
|