aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/ScalarEvolutionExpander.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis/ScalarEvolutionExpander.h')
-rw-r--r--include/llvm/Analysis/ScalarEvolutionExpander.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h
index a519f93216b3..b4d727449fbe 100644
--- a/include/llvm/Analysis/ScalarEvolutionExpander.h
+++ b/include/llvm/Analysis/ScalarEvolutionExpander.h
@@ -77,9 +77,13 @@ namespace llvm {
/// Phis that complete an IV chain. Reuse
DenseSet<AssertingVH<PHINode>> ChainedPhis;
- /// When true, expressions are expanded in "canonical" form. In particular,
- /// addrecs are expanded as arithmetic based on a canonical induction
- /// variable. When false, expression are expanded in a more literal form.
+ /// When true, SCEVExpander tries to expand expressions in "canonical" form.
+ /// When false, expressions are expanded in a more literal form.
+ ///
+ /// In "canonical" form addrecs are expanded as arithmetic based on a
+ /// canonical induction variable. Note that CanonicalMode doesn't guarantee
+ /// that all expressions are expanded in "canonical" form. For some
+ /// expressions literal mode can be preferred.
bool CanonicalMode;
/// When invoked from LSR, the expander is in "strength reduction" mode. The
@@ -275,8 +279,16 @@ namespace llvm {
/// Clear the current insertion point. This is useful if the instruction
/// that had been serving as the insertion point may have been deleted.
- void clearInsertPoint() {
- Builder.ClearInsertionPoint();
+ void clearInsertPoint() { Builder.ClearInsertionPoint(); }
+
+ /// Set location information used by debugging information.
+ void SetCurrentDebugLocation(DebugLoc L) {
+ Builder.SetCurrentDebugLocation(std::move(L));
+ }
+
+ /// Get location information used by debugging information.
+ const DebugLoc &getCurrentDebugLocation() const {
+ return Builder.getCurrentDebugLocation();
}
/// Return true if the specified instruction was inserted by the code