[PATCH] D24104: Make GlobalsAA ignore dead constant expressions.

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 16:22:42 PDT 2016

hfinkel added a subscriber: hfinkel.

Comment at: lib/Analysis/GlobalsModRef.cpp:277
@@ -276,1 +276,3 @@
+      // AnalyzeUsesOfPointer assumes all uses of the value are live.
+      F.removeDeadConstantUsers();
       if (!AnalyzeUsesOfPointer(&F)) {
mkuper wrote:
> Don't know enough about GlobalsAA to approve this anyway, but as a matter of principle - is it acceptable for an analysis pass to modify the IR?
No, they shouldn't.



More information about the llvm-commits mailing list