Fix regression from my recent GlobalsAA fix.
authorEli Friedman <efriedma@codeaurora.org>
Mon, 24 Oct 2016 21:47:44 +0000 (21:47 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Mon, 24 Oct 2016 21:47:44 +0000 (21:47 +0000)
commitc5b7262073bfb4c1237687a65107f532de58fc84
tree436a33774f7db579dc3d35db068c836219630730
parente3e6585c2d2f57c6354825b411dec9c377fa43f3
Fix regression from my recent GlobalsAA fix.

There are two fixes here: one, AnalyzeUsesOfPointer can't return
false until it has checked all the uses of the pointer. Two, if a
global uses another global, we have to assume the address of the
first global escapes.

Fixes https://llvm.org/bugs/show_bug.cgi?id=30707 .

Differential Revision: https://reviews.llvm.org/D25798

llvm-svn: 285034
llvm/lib/Analysis/GlobalsModRef.cpp
llvm/test/Analysis/GlobalsModRef/global-used-by-global.ll [new file with mode: 0644]