Mercurial > hg > Members > tobaru > cbc > CbC_llvm
comparison lib/Target/PowerPC/PPCTargetTransformInfo.cpp @ 100:7d135dc70f03
LLVM 3.9
author | Miyagi Mitsuki <e135756@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Jan 2016 22:53:40 +0900 |
parents | afa8332a0e37 |
children | 1172e4bd9c6f |
comparison
equal
deleted
inserted
replaced
96:6418606d0ead | 100:7d135dc70f03 |
---|---|
18 | 18 |
19 #define DEBUG_TYPE "ppctti" | 19 #define DEBUG_TYPE "ppctti" |
20 | 20 |
21 static cl::opt<bool> DisablePPCConstHoist("disable-ppc-constant-hoisting", | 21 static cl::opt<bool> DisablePPCConstHoist("disable-ppc-constant-hoisting", |
22 cl::desc("disable constant hoisting on PPC"), cl::init(false), cl::Hidden); | 22 cl::desc("disable constant hoisting on PPC"), cl::init(false), cl::Hidden); |
23 | |
24 // This is currently only used for the data prefetch pass which is only enabled | |
25 // for BG/Q by default. | |
26 static cl::opt<unsigned> | |
27 CacheLineSize("ppc-loop-prefetch-cache-line", cl::Hidden, cl::init(64), | |
28 cl::desc("The loop prefetch cache line size")); | |
23 | 29 |
24 //===----------------------------------------------------------------------===// | 30 //===----------------------------------------------------------------------===// |
25 // | 31 // |
26 // PPC cost model. | 32 // PPC cost model. |
27 // | 33 // |
228 return 64; | 234 return 64; |
229 return 32; | 235 return 32; |
230 | 236 |
231 } | 237 } |
232 | 238 |
239 unsigned PPCTTIImpl::getCacheLineSize() { | |
240 // This is currently only used for the data prefetch pass which is only | |
241 // enabled for BG/Q by default. | |
242 return CacheLineSize; | |
243 } | |
244 | |
233 unsigned PPCTTIImpl::getMaxInterleaveFactor(unsigned VF) { | 245 unsigned PPCTTIImpl::getMaxInterleaveFactor(unsigned VF) { |
234 unsigned Directive = ST->getDarwinDirective(); | 246 unsigned Directive = ST->getDarwinDirective(); |
235 // The 440 has no SIMD support, but floating-point instructions | 247 // The 440 has no SIMD support, but floating-point instructions |
236 // have a 5-cycle latency, so unroll by 5x for latency hiding. | 248 // have a 5-cycle latency, so unroll by 5x for latency hiding. |
237 if (Directive == PPC::DIR_440) | 249 if (Directive == PPC::DIR_440) |