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

hfinkel at anl.gov hfinkel at anl.gov
Mon Feb 23 11:29:49 PST 2015


================
Comment at: lib/CodeGen/BranchFolding.cpp:752
@@ +751,3 @@
+
+    if (V1)
+      GetUnderlyingObjects(const_cast<Value *>(V1), Objs1);
----------------
I think function is good, except for this part. Comparing the value's underlying objects won't be sufficient if AA is being used (I think its probably fine otherwise, but I don't really want use-of-AA-dependent behavior here). I think we, realistically, have two options (which as I explained earlier, are more-or-less the same in effect currently):

 1. If V1 != V2, strip the MMOs.
 2. If V1 != V2, add multiple MMOs.

I think that doing (1) is fine for now, but I'd actually like to see us add multiple MMOs (option 2), and let the scheduler deal with that (which it does not currently).

http://reviews.llvm.org/D7769

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






More information about the llvm-commits mailing list