diff options
author | Adam Nemet <anemet@apple.com> | 2016-02-18 21:38:19 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2016-02-18 21:38:19 +0000 |
commit | 9d9cb274ea8830e0163e58a2fe0ff2b20ea367d3 (patch) | |
tree | 1debd1e966f811206abc5355bd14d2cc364d6c47 | |
parent | 7cf9b1bf0515dd630012f9f667dba84bf2b966b5 (diff) | |
download | bcm5719-llvm-9d9cb274ea8830e0163e58a2fe0ff2b20ea367d3.tar.gz bcm5719-llvm-9d9cb274ea8830e0163e58a2fe0ff2b20ea367d3.zip |
[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
-rw-r--r-- | llvm/include/llvm/Transforms/Scalar.h | 6 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/CMakeLists.txt | 1 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPC.h | 1 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/CMakeLists.txt | 1 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp (renamed from llvm/lib/Target/PowerPC/PPCLoopDataPrefetch.cpp) | 5 |
6 files changed, 10 insertions, 6 deletions
diff --git a/llvm/include/llvm/Transforms/Scalar.h b/llvm/include/llvm/Transforms/Scalar.h index 86473900f7c..a923f8344cf 100644 --- a/llvm/include/llvm/Transforms/Scalar.h +++ b/llvm/include/llvm/Transforms/Scalar.h @@ -498,6 +498,12 @@ Pass *createLoopSimplifyCFGPass(); // FunctionPass *createLoopVersioningPass(); +//===----------------------------------------------------------------------===// +// +// LoopDataPrefetch - Perform data prefetching in loops. +// +FunctionPass *createLoopDataPrefetchPass(); + } // End llvm namespace #endif diff --git a/llvm/lib/Target/PowerPC/CMakeLists.txt b/llvm/lib/Target/PowerPC/CMakeLists.txt index c31ababafbe..e8316e937cb 100644 --- a/llvm/lib/Target/PowerPC/CMakeLists.txt +++ b/llvm/lib/Target/PowerPC/CMakeLists.txt @@ -24,7 +24,6 @@ add_llvm_target(PowerPCCodeGen PPCEarlyReturn.cpp PPCFastISel.cpp PPCFrameLowering.cpp - PPCLoopDataPrefetch.cpp PPCLoopPreIncPrep.cpp PPCMCInstLower.cpp PPCMachineFunctionInfo.cpp diff --git a/llvm/lib/Target/PowerPC/PPC.h b/llvm/lib/Target/PowerPC/PPC.h index a259ed3fd32..a4235fa6e04 100644 --- a/llvm/lib/Target/PowerPC/PPC.h +++ b/llvm/lib/Target/PowerPC/PPC.h @@ -34,7 +34,6 @@ namespace llvm { #ifndef NDEBUG FunctionPass *createPPCCTRLoopsVerify(); #endif - FunctionPass *createPPCLoopDataPrefetchPass(); FunctionPass *createPPCLoopPreIncPrepPass(PPCTargetMachine &TM); FunctionPass *createPPCTOCRegDepsPass(); FunctionPass *createPPCEarlyReturnPass(); diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index d24b590317f..230f2f9c5f2 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -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 diff --git a/llvm/lib/Transforms/Scalar/CMakeLists.txt b/llvm/lib/Transforms/Scalar/CMakeLists.txt index e25ac8ed87b..2684cee838f 100644 --- a/llvm/lib/Transforms/Scalar/CMakeLists.txt +++ b/llvm/lib/Transforms/Scalar/CMakeLists.txt @@ -17,6 +17,7 @@ add_llvm_library(LLVMScalarOpts LICM.cpp LoadCombine.cpp LoopDeletion.cpp + LoopDataPrefetch.cpp LoopDistribute.cpp LoopIdiomRecognize.cpp LoopInstSimplify.cpp diff --git a/llvm/lib/Target/PowerPC/PPCLoopDataPrefetch.cpp b/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp index e687a6d3d57..0edceec8e13 100644 --- a/llvm/lib/Target/PowerPC/PPCLoopDataPrefetch.cpp +++ b/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp @@ -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(); |