[PATCH] R600/SI: Allow partial unrolling and increase thresholds.
Tom Stellard
tom at stellard.net
Fri Jul 25 15:14:04 PDT 2014
On Wed, Jul 23, 2014 at 07:08:31PM +0000, Matt Arsenault wrote:
> Doubling the base unroll threshold is a conservative increase, and might want to be increased more later.
>
LGTM.
> http://reviews.llvm.org/D4644
>
> Files:
> lib/Target/R600/AMDGPUTargetTransformInfo.cpp
>
> Index: lib/Target/R600/AMDGPUTargetTransformInfo.cpp
> ===================================================================
> --- lib/Target/R600/AMDGPUTargetTransformInfo.cpp
> +++ lib/Target/R600/AMDGPUTargetTransformInfo.cpp
> @@ -101,6 +101,12 @@
>
> 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 @@
> //
> // Don't use the maximum allowed value here as it will make some
> // programs way too big.
> - UP.Threshold = 500;
> + UP.Threshold = 800;
> }
> }
> }
> Index: lib/Target/R600/AMDGPUTargetTransformInfo.cpp
> ===================================================================
> --- lib/Target/R600/AMDGPUTargetTransformInfo.cpp
> +++ lib/Target/R600/AMDGPUTargetTransformInfo.cpp
> @@ -101,6 +101,12 @@
>
> 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 @@
> //
> // Don't use the maximum allowed value here as it will make some
> // programs way too big.
> - UP.Threshold = 500;
> + UP.Threshold = 800;
> }
> }
> }
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list