aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/AliasAnalysis.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-01-03 21:38:41 +0000
committerOwen Anderson <resistor@mac.com>2011-01-03 21:38:41 +0000
commitab6acc6ecdc4585a55059e36d81481d1c26d3ff9 (patch)
tree59e2d272e91a2b8e69d947794b7a2503ba50e7cf /include/llvm/Analysis/AliasAnalysis.h
parent375e5a380c38e8203ae90afd37f4a22266bc6357 (diff)
downloadexternal_llvm-ab6acc6ecdc4585a55059e36d81481d1c26d3ff9.zip
external_llvm-ab6acc6ecdc4585a55059e36d81481d1c26d3ff9.tar.gz
external_llvm-ab6acc6ecdc4585a55059e36d81481d1c26d3ff9.tar.bz2
Stub out a new updating interface to AliasAnalysis, allowing stateful analyses to be informed when
a pointer value has potentially become escaping. Implementations can choose to either fall back to conservative responses for that value, or may recompute their analysis to accomodate the change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/AliasAnalysis.h')
-rw-r--r--include/llvm/Analysis/AliasAnalysis.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h
index c218e05..2375a07 100644
--- a/include/llvm/Analysis/AliasAnalysis.h
+++ b/include/llvm/Analysis/AliasAnalysis.h
@@ -469,6 +469,17 @@ public:
///
virtual void copyValue(Value *From, Value *To);
+ /// addEscapingUse - This method should be used whenever an escaping use is
+ /// added to a pointer value. Analysis implementations may either return
+ /// conservative responses for that value in the future, or may recompute
+ /// some or all internal state to continue providing precise responses.
+ ///
+ /// Escaping uses are considered by anything _except_ the following:
+ /// - GEPs or bitcasts of the pointer
+ /// - Loads through the pointer
+ /// - Stores through (but not of) the pointer
+ virtual void addEscapingUse(Use &U);
+
/// replaceWithNewValue - This method is the obvious combination of the two
/// above, and it provided as a helper to simplify client code.
///