diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-08-29 03:29:57 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-08-29 03:29:57 +0000 |
commit | 32f258b96a723b771eb44a2c0689b8bf4dd871ee (patch) | |
tree | 0a48bd05ecababcbe58e27cdd0dd15ab16c6f1f4 /include/llvm/Analysis | |
parent | 253acef7a5ea2fbba7848d2257ae3cce2ea02ce0 (diff) | |
download | external_llvm-32f258b96a723b771eb44a2c0689b8bf4dd871ee.zip external_llvm-32f258b96a723b771eb44a2c0689b8bf4dd871ee.tar.gz external_llvm-32f258b96a723b771eb44a2c0689b8bf4dd871ee.tar.bz2 |
Add getUnrollingPreferences to TTI
Allow targets to customize the default behavior of the generic loop unrolling
transformation. This will be used by the PowerPC backend when targeting the A2
core (which is in-order with a deep pipeline), and using more aggressive
defaults is important.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/TargetTransformInfo.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Analysis/TargetTransformInfo.h b/include/llvm/Analysis/TargetTransformInfo.h index 06810a7..908612c 100644 --- a/include/llvm/Analysis/TargetTransformInfo.h +++ b/include/llvm/Analysis/TargetTransformInfo.h @@ -191,6 +191,20 @@ public: /// incurs significant execution cost. virtual bool isLoweredToCall(const Function *F) const; + /// Parameters that control the generic loop unrolling transformation. + struct UnrollingPreferences { + unsigned Threshold; ///< The cost threshold for the unrolled loop. + unsigned OptSizeThreshold; ///< The cost threshold for the unrolled loop + ///< when optimizing for size. + bool Partial; ///< Allow partial loop unrolling. + bool Runtime; ///< Perform runtime unrolling. + }; + + /// \brief Get target-customized preferences for the generic loop unrolling + /// transformation. Returns true if the UnrollingPreferences struct has been + /// initialized. + virtual bool getUnrollingPreferences(UnrollingPreferences &UP) const; + /// @} /// \name Scalar Target Information |