[PATCH] D11707: [GMR] Teach the conservative path of GMR to catch even more easy cases.

Michael Kuperstein michael.m.kuperstein at intel.com
Sun Aug 2 02:00:09 PDT 2015


mkuper added inline comments.

================
Comment at: lib/Analysis/IPA/GlobalsModRef.cpp:734
@@ +733,3 @@
+
+      // Otherwise, a load colud come from anywhere, so bail.
+      return false;
----------------
colud -> could

================
Comment at: lib/Analysis/IPA/GlobalsModRef.cpp:762
@@ +761,3 @@
+
+    // Unknown instruction, bail.
+    return false;
----------------
It looks like this also covers the case where we end up reaching GV itself in the recursion. Perhaps make that explicit?

================
Comment at: lib/Analysis/IPA/GlobalsModRef.cpp:806
@@ -741,1 +805,3 @@
+    if ((GV1 || GV2) && GV1 != GV2)
+      if (isNonEscapingGlobalNoAlias(GV1 ? GV1 : GV2, GV1 ? UV2 : UV1))
         return NoAlias;
----------------
This looks a bit confusing.
Can we turn this into the more standard "if (!GV1) swap..." pattern?


http://reviews.llvm.org/D11707







More information about the llvm-commits mailing list