[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:
Adam Nemet 2016-02-18 21:38:19 +00:00
parent 7cf9b1bf05
commit 9d9cb274ea
6 changed files with 10 additions and 6 deletions

View File

@ -498,6 +498,12 @@ Pass *createLoopSimplifyCFGPass();
//
FunctionPass *createLoopVersioningPass();
//===----------------------------------------------------------------------===//
//
// LoopDataPrefetch - Perform data prefetching in loops.
//
FunctionPass *createLoopDataPrefetchPass();
} // End llvm namespace
#endif

View File

@ -24,7 +24,6 @@ add_llvm_target(PowerPCCodeGen
PPCEarlyReturn.cpp
PPCFastISel.cpp
PPCFrameLowering.cpp
PPCLoopDataPrefetch.cpp
PPCLoopPreIncPrep.cpp
PPCMCInstLower.cpp
PPCMachineFunctionInfo.cpp

View File

@ -34,7 +34,6 @@ namespace llvm {
#ifndef NDEBUG
FunctionPass *createPPCCTRLoopsVerify();
#endif
FunctionPass *createPPCLoopDataPrefetchPass();
FunctionPass *createPPCLoopPreIncPrepPass(PPCTargetMachine &TM);
FunctionPass *createPPCTOCRegDepsPass();
FunctionPass *createPPCEarlyReturnPass();

View File

@ -313,7 +313,7 @@ void PPCPassConfig::addIRPasses() {
if (EnablePrefetch.getNumOccurrences() > 0)
UsePrefetching = EnablePrefetch;
if (UsePrefetching)
addPass(createPPCLoopDataPrefetchPass());
addPass(createLoopDataPrefetchPass());
if (TM->getOptLevel() == CodeGenOpt::Aggressive && EnableGEPOpt) {
// Call SeparateConstOffsetFromGEP pass to extract constants within indices

View File

@ -17,6 +17,7 @@ add_llvm_library(LLVMScalarOpts
LICM.cpp
LoadCombine.cpp
LoopDeletion.cpp
LoopDataPrefetch.cpp
LoopDistribute.cpp
LoopIdiomRecognize.cpp
LoopInstSimplify.cpp

View File

@ -1,4 +1,4 @@
//===-------- PPCLoopDataPrefetch.cpp - Loop Data Prefetching Pass --------===//
//===-------- LoopDataPrefetch.cpp - Loop Data Prefetching Pass -----------===//
//
// The LLVM Compiler Infrastructure
//
@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "loop-data-prefetch"
#include "PPC.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/Statistic.h"
@ -91,7 +90,7 @@ INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass)
INITIALIZE_PASS_END(LoopDataPrefetch, "loop-data-prefetch",
"Loop Data Prefetch", false, false)
FunctionPass *llvm::createPPCLoopDataPrefetchPass() { return new LoopDataPrefetch(); }
FunctionPass *llvm::createLoopDataPrefetchPass() { return new LoopDataPrefetch(); }
bool LoopDataPrefetch::runOnFunction(Function &F) {
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();