[PATCH] New alias analysis for static global variables

David Majnemer david.majnemer at gmail.com
Wed May 27 10:57:10 PDT 2015


================
Comment at: lib/Analysis/IPA/StaticGlobalsAA.cpp:123
@@ +122,3 @@
+    if (GV.hasLocalLinkage()) {
+      if (!isa<Function>(GV))
+        if (!hasAddressTaken(&GV))
----------------
How can `GV` be a `Function`?

================
Comment at: lib/Analysis/IPA/StaticGlobalsAA.cpp:124
@@ +123,3 @@
+      if (!isa<Function>(GV))
+        if (!hasAddressTaken(&GV))
+          NonAddressTakenGlobals.insert(&GV);
----------------
What if the local global variable has an external alias?

http://reviews.llvm.org/D10059

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list