summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-07-22 11:43:24 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-07-22 11:43:24 +0000
commit56e2c62a8d1bc3337f022c02c3865916faa9f440 (patch)
treeb661867afbfca1b676e7dca8be2285e584ca8073 /llvm/lib/Analysis/IPA/GlobalsModRef.cpp
parent6919267d0be8a854ef2397269f9fe6784377de64 (diff)
downloadbcm5719-llvm-56e2c62a8d1bc3337f022c02c3865916faa9f440.tar.gz
bcm5719-llvm-56e2c62a8d1bc3337f022c02c3865916faa9f440.zip
[GMR] Only look in the associated allocs map for an underlying value if
it wasn't one of the indirect globals (which clearly cannot be an allocation function call). Also only do a single lookup into this map instead of two. NFC. llvm-svn: 242892
Diffstat (limited to 'llvm/lib/Analysis/IPA/GlobalsModRef.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/GlobalsModRef.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
index 7713a5b6476..c0fb3cdae1f 100644
--- a/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/llvm/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -599,10 +599,10 @@ AliasResult GlobalsModRef::alias(const MemoryLocation &LocA,
// These pointers may also be from an allocation for the indirect global. If
// so, also handle them.
- if (AllocsForIndirectGlobals.count(UV1))
- GV1 = AllocsForIndirectGlobals[UV1];
- if (AllocsForIndirectGlobals.count(UV2))
- GV2 = AllocsForIndirectGlobals[UV2];
+ if (!GV1)
+ GV1 = AllocsForIndirectGlobals.lookup(UV1);
+ if (!GV2)
+ GV2 = AllocsForIndirectGlobals.lookup(UV2);
// Now that we know whether the two pointers are related to indirect globals,
// use this to disambiguate the pointers. If the pointers are based on
OpenPOWER on IntegriCloud