[PATCH] Remove all MMOs from memory operations when tail merging.

hfinkel at anl.gov hfinkel at anl.gov
Thu Feb 19 16:16:58 PST 2015


> Does the new clearMemRefs() API need to free any memory?


No. The memory for memrefs is owned by the machine function (it is allocated by MF.allocateMemRefsArray()).


================
Comment at: lib/CodeGen/BranchFolding.cpp:735
@@ +734,3 @@
+    if (MII.mayLoad() || MII.mayStore())
+      MII.clearMemRefs();
+}
----------------
We can do better than this. Don't remove the MMOs if we're tail merging two instructions that have identical MMOs.

http://reviews.llvm.org/D7769

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






More information about the llvm-commits mailing list