aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-10-18 21:28:00 +0000
committerDan Gohman <gohman@apple.com>2010-10-18 21:28:00 +0000
commitfb8096dee5df60f156e770b9f96f8417e9dbd4c9 (patch)
treeb350cb9cdd41c4464e549dcb6c3593f325e5f82e /include/llvm
parentb41ee96d76ccf1eec2fd898def4cfd7c16868708 (diff)
downloadexternal_llvm-fb8096dee5df60f156e770b9f96f8417e9dbd4c9.zip
external_llvm-fb8096dee5df60f156e770b9f96f8417e9dbd4c9.tar.gz
external_llvm-fb8096dee5df60f156e770b9f96f8417e9dbd4c9.tar.bz2
Don't pass the raw invalid pointer used to represent conflicting
TBAA information to AliasAnalysis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Analysis/AliasSetTracker.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h
index d3e8c72..452724c 100644
--- a/include/llvm/Analysis/AliasSetTracker.h
+++ b/include/llvm/Analysis/AliasSetTracker.h
@@ -67,7 +67,21 @@ class AliasSet : public ilist_node<AliasSet> {
unsigned getSize() const { return Size; }
- const MDNode *getTBAAInfo() const { return TBAAInfo; }
+ /// getRawTBAAInfo - Return the raw TBAAInfo member. In addition to
+ /// being null or a pointer to an MDNode, this could be -1, meaning
+ /// there was conflicting information.
+ const MDNode *getRawTBAAInfo() const {
+ return TBAAInfo;
+ }
+
+ /// getTBAAInfo - Return the TBAAInfo, or null if there is no
+ /// information or conflicting information.
+ const MDNode *getTBAAInfo() const {
+ // If we have conflicting TBAAInfo, return null.
+ if (TBAAInfo == reinterpret_cast<const MDNode *>(-1))
+ return 0;
+ return TBAAInfo;
+ }
AliasSet *getAliasSet(AliasSetTracker &AST) {
assert(AS && "No AliasSet yet!");
@@ -195,6 +209,7 @@ public:
Value *getPointer() const { return CurNode->getValue(); }
unsigned getSize() const { return CurNode->getSize(); }
+ const MDNode *getRawTBAAInfo() const { return CurNode->getRawTBAAInfo(); }
const MDNode *getTBAAInfo() const { return CurNode->getTBAAInfo(); }
iterator& operator++() { // Preincrement