From a81ce56bea2ff9695be9256bc9fff51148367fc6 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 17 Sep 2013 10:49:46 -0700 Subject: [PATCH] XXX: R600: Implement loop unrolling prefs --- lib/Target/R600/AMDGPUTargetTransformInfo.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Target/R600/AMDGPUTargetTransformInfo.cpp b/lib/Target/R600/AMDGPUTargetTransformInfo.cpp index 8db319c..cdda314c 100644 --- a/lib/Target/R600/AMDGPUTargetTransformInfo.cpp +++ b/lib/Target/R600/AMDGPUTargetTransformInfo.cpp @@ -73,6 +73,8 @@ public: virtual bool hasBranchDivergence() const; + virtual void getUnrollingPreferences(Loop *L, UnrollingPreferences &UP) const; + /// @} }; @@ -88,3 +90,8 @@ llvm::createAMDGPUTargetTransformInfoPass(const AMDGPUTargetMachine *TM) { } bool AMDGPUTTI::hasBranchDivergence() const { return true; } + +void AMDGPUTTI::getUnrollingPreferences(Loop *L, UnrollingPreferences &UP) const { + UP.Partial = UP.Runtime = true; + UP.Threshold = UP.OptSizeThreshold = UINT_MAX; +} -- 1.7.11.4