[llvm] r213985 - R600/SI: Allow partial unrolling and increase thresholds.
Matt Arsenault
Matthew.Arsenault at amd.com
Fri Jul 25 16:02:42 PDT 2014
Author: arsenm
Date: Fri Jul 25 18:02:42 2014
New Revision: 213985
URL: http://llvm.org/viewvc/llvm-project?rev=213985&view=rev
Log:
R600/SI: Allow partial unrolling and increase thresholds.
Modified:
llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
Modified: llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.cpp?rev=213985&r1=213984&r2=213985&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUTargetTransformInfo.cpp Fri Jul 25 18:02:42 2014
@@ -101,6 +101,12 @@ bool AMDGPUTTI::hasBranchDivergence() co
void AMDGPUTTI::getUnrollingPreferences(Loop *L,
UnrollingPreferences &UP) const {
+ UP.Threshold = 300; // Twice the default.
+ UP.Count = UINT_MAX;
+ UP.Partial = true;
+
+ // TODO: Do we want runtime unrolling?
+
for (const BasicBlock *BB : L->getBlocks()) {
for (const Instruction &I : *BB) {
const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(&I);
@@ -120,7 +126,7 @@ void AMDGPUTTI::getUnrollingPreferences(
//
// Don't use the maximum allowed value here as it will make some
// programs way too big.
- UP.Threshold = 500;
+ UP.Threshold = 800;
}
}
}
More information about the llvm-commits
mailing list