[PATCH] D69690: [GlobalsAA] Set MayReadAnyGlobal when nothing is known about a function.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 31 16:35:40 PDT 2019
asbirlea created this revision.
asbirlea added reviewers: nlopes, sanjoy.google.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
MayReadAnyGlobal should be set when nothing is known about the function, similarly with the above if clause.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D69690
Files:
llvm/lib/Analysis/GlobalsModRef.cpp
Index: llvm/lib/Analysis/GlobalsModRef.cpp
===================================================================
--- llvm/lib/Analysis/GlobalsModRef.cpp
+++ llvm/lib/Analysis/GlobalsModRef.cpp
@@ -526,6 +526,8 @@
FI.setMayReadAnyGlobal();
} else {
FI.addModRefInfo(ModRefInfo::ModRef);
+ if (!F->isIntrinsic() && !F->onlyAccessesArgMemory())
+ FI.setMayReadAnyGlobal();
// Can't say anything useful unless it's an intrinsic - they don't
// read or write global variables of the kind considered here.
KnowNothing = !F->isIntrinsic();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69690.227373.patch
Type: text/x-patch
Size: 617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191031/089712c1/attachment-0001.bin>
More information about the llvm-commits
mailing list