[PATCH] D11900: [GMR] Be a bit smarter about which globals alias when doing recursive lookups

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 11:37:34 PDT 2015


majnemer added inline comments.

================
Comment at: lib/Analysis/IPA/GlobalsModRef.cpp:728-729
@@ +727,4 @@
+          !GVar->mayBeOverridden() && !InputGVar->mayBeOverridden() &&
+          DL->getTypeAllocSize(GVar->getInitializer()->getType()) &&
+          DL->getTypeAllocSize(InputGVar->getInitializer()->getType()))
+        continue;
----------------
chandlerc wrote:
> I would explicitly write "> 0" for these.
Note that the type might not be sized if it's a global variable with an opaque body.  You might want to query `isSized` first.


http://reviews.llvm.org/D11900





More information about the llvm-commits mailing list