[PATCH] D11547: AliasSetTracker "fixme" fix - using mod/ref information for UnknownInstr

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 9 22:35:00 PDT 2015


hfinkel added inline comments.

================
Comment at: lib/Analysis/AliasSetTracker.cpp:116
@@ +115,3 @@
+  if (MR != MRI_NoModRef)
+    Access |= (MR & MRI_Mod) ? ModAccess : RefAccess;
+
----------------
If MR == MRI_ModRef, then this will always add only ModAccess. Is this right when Access == RefAccess? (can that happen?)

================
Comment at: lib/Analysis/AliasSetTracker.cpp:174
@@ +173,3 @@
+
+  auto OnMR = [MRcommonPtr, &MRcommon](ModRefInfo MR)->bool {
+    MRcommon = ModRefInfo(MRcommon | MR);
----------------
Why is this called "OnMR"? Do you mean OrMR?

================
Comment at: lib/Analysis/AliasSetTracker.cpp:203
@@ +202,3 @@
+  // to gather worst ModRefInfo
+  auto OnMR = [MRcommonPtr, &MRcommon](ModRefInfo MR)->bool {
+    MRcommon = ModRefInfo(MRcommon | MR);
----------------
Lambdas are nice, but not if you need to repeat them ;) -- Please make utility functions for these (static helpers are fine).



http://reviews.llvm.org/D11547





More information about the llvm-commits mailing list