aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/ScalarEvolutionExpander.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-07-13 23:33:10 +0000
committerAndrew Trick <atrick@apple.com>2012-07-13 23:33:10 +0000
commite08c32249fca32cd7b122024a4ca252fcb235694 (patch)
tree923f5912e0f49151d6ce7ff084b99bc6cec72c3e /include/llvm/Analysis/ScalarEvolutionExpander.h
parent31f61e8b221eee4f839687e9ec4df89a469a2652 (diff)
downloadexternal_llvm-e08c32249fca32cd7b122024a4ca252fcb235694.zip
external_llvm-e08c32249fca32cd7b122024a4ca252fcb235694.tar.gz
external_llvm-e08c32249fca32cd7b122024a4ca252fcb235694.tar.bz2
LSR Fix: check SCEV expression safety before expansion.
All SCEV expressions used by LSR formulae must be safe to expand. i.e. they may not contain UDiv unless we can prove nonzero denominator. Fixes PR11356: LSR hoists UDiv. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160205 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ScalarEvolutionExpander.h')
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpander.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h
index cbbe429..3f8f149 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpander.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpander.h
@@ -24,6 +24,10 @@
namespace llvm {
class TargetLowering;
+ /// Return true if the given expression is safe to expand in the sense that
+ /// all materialized values are safe to speculate.
+ bool isSafeToExpand(const SCEV *S);
+
/// SCEVExpander - This class uses information about analyze scalars to
/// rewrite expressions in canonical form.
///