aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r--include/llvm/Analysis/TargetTransformInfo.h14
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