mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[PPCLoopDataPrefetch] Move pass to Transforms/Scalar/LoopDataPrefetch. NFC
This patch is part of the work to make PPCLoopDataPrefetch target-independent (http://thread.gmane.org/gmane.comp.compilers.llvm.devel/92758). Obviously the pass still only used from PPC at this point. Subsequent patches will start driving this from ARM64 as well. Due to the previous patch most lines should show up as moved lines. llvm-svn: 261265
This commit is contained in:
parent
f9d4c08808
commit
27b8897111
@ -498,6 +498,12 @@ Pass *createLoopSimplifyCFGPass();
|
|||||||
//
|
//
|
||||||
FunctionPass *createLoopVersioningPass();
|
FunctionPass *createLoopVersioningPass();
|
||||||
|
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
//
|
||||||
|
// LoopDataPrefetch - Perform data prefetching in loops.
|
||||||
|
//
|
||||||
|
FunctionPass *createLoopDataPrefetchPass();
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,7 +24,6 @@ add_llvm_target(PowerPCCodeGen
|
|||||||
PPCEarlyReturn.cpp
|
PPCEarlyReturn.cpp
|
||||||
PPCFastISel.cpp
|
PPCFastISel.cpp
|
||||||
PPCFrameLowering.cpp
|
PPCFrameLowering.cpp
|
||||||
PPCLoopDataPrefetch.cpp
|
|
||||||
PPCLoopPreIncPrep.cpp
|
PPCLoopPreIncPrep.cpp
|
||||||
PPCMCInstLower.cpp
|
PPCMCInstLower.cpp
|
||||||
PPCMachineFunctionInfo.cpp
|
PPCMachineFunctionInfo.cpp
|
||||||
|
@ -34,7 +34,6 @@ namespace llvm {
|
|||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
FunctionPass *createPPCCTRLoopsVerify();
|
FunctionPass *createPPCCTRLoopsVerify();
|
||||||
#endif
|
#endif
|
||||||
FunctionPass *createPPCLoopDataPrefetchPass();
|
|
||||||
FunctionPass *createPPCLoopPreIncPrepPass(PPCTargetMachine &TM);
|
FunctionPass *createPPCLoopPreIncPrepPass(PPCTargetMachine &TM);
|
||||||
FunctionPass *createPPCTOCRegDepsPass();
|
FunctionPass *createPPCTOCRegDepsPass();
|
||||||
FunctionPass *createPPCEarlyReturnPass();
|
FunctionPass *createPPCEarlyReturnPass();
|
||||||
|
@ -313,7 +313,7 @@ void PPCPassConfig::addIRPasses() {
|
|||||||
if (EnablePrefetch.getNumOccurrences() > 0)
|
if (EnablePrefetch.getNumOccurrences() > 0)
|
||||||
UsePrefetching = EnablePrefetch;
|
UsePrefetching = EnablePrefetch;
|
||||||
if (UsePrefetching)
|
if (UsePrefetching)
|
||||||
addPass(createPPCLoopDataPrefetchPass());
|
addPass(createLoopDataPrefetchPass());
|
||||||
|
|
||||||
if (TM->getOptLevel() == CodeGenOpt::Aggressive && EnableGEPOpt) {
|
if (TM->getOptLevel() == CodeGenOpt::Aggressive && EnableGEPOpt) {
|
||||||
// Call SeparateConstOffsetFromGEP pass to extract constants within indices
|
// Call SeparateConstOffsetFromGEP pass to extract constants within indices
|
||||||
|
@ -17,6 +17,7 @@ add_llvm_library(LLVMScalarOpts
|
|||||||
LICM.cpp
|
LICM.cpp
|
||||||
LoadCombine.cpp
|
LoadCombine.cpp
|
||||||
LoopDeletion.cpp
|
LoopDeletion.cpp
|
||||||
|
LoopDataPrefetch.cpp
|
||||||
LoopDistribute.cpp
|
LoopDistribute.cpp
|
||||||
LoopIdiomRecognize.cpp
|
LoopIdiomRecognize.cpp
|
||||||
LoopInstSimplify.cpp
|
LoopInstSimplify.cpp
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//===-------- PPCLoopDataPrefetch.cpp - Loop Data Prefetching Pass --------===//
|
//===-------- LoopDataPrefetch.cpp - Loop Data Prefetching Pass -----------===//
|
||||||
//
|
//
|
||||||
// The LLVM Compiler Infrastructure
|
// The LLVM Compiler Infrastructure
|
||||||
//
|
//
|
||||||
@ -12,7 +12,6 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#define DEBUG_TYPE "loop-data-prefetch"
|
#define DEBUG_TYPE "loop-data-prefetch"
|
||||||
#include "PPC.h"
|
|
||||||
#include "llvm/Transforms/Scalar.h"
|
#include "llvm/Transforms/Scalar.h"
|
||||||
#include "llvm/ADT/DepthFirstIterator.h"
|
#include "llvm/ADT/DepthFirstIterator.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
@ -91,7 +90,7 @@ INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass)
|
|||||||
INITIALIZE_PASS_END(LoopDataPrefetch, "loop-data-prefetch",
|
INITIALIZE_PASS_END(LoopDataPrefetch, "loop-data-prefetch",
|
||||||
"Loop Data Prefetch", false, false)
|
"Loop Data Prefetch", false, false)
|
||||||
|
|
||||||
FunctionPass *llvm::createPPCLoopDataPrefetchPass() { return new LoopDataPrefetch(); }
|
FunctionPass *llvm::createLoopDataPrefetchPass() { return new LoopDataPrefetch(); }
|
||||||
|
|
||||||
bool LoopDataPrefetch::runOnFunction(Function &F) {
|
bool LoopDataPrefetch::runOnFunction(Function &F) {
|
||||||
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
|
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
|
Loading…
Reference in New Issue
Block a user