[PATCH] D33125: Introduce isoneof<T0, T1, ...> as an extension of isa<T>

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 13 00:03:06 PDT 2017


serge-sans-paille added inline comments.


================
Comment at: lib/Analysis/MemoryDependenceAnalysis.cpp:747
           MemLoc, isLoad, ScanPos->getIterator(), QueryParent, QueryInst);
-    } else if (isa<CallInst>(QueryInst) || isa<InvokeInst>(QueryInst)) {
-      CallSite QueryCS(QueryInst);
+    } else if (CallSite QueryCS{QueryInst}) {
       bool isReadOnly = AA.onlyReadsMemory(QueryCS);
----------------
grandinj wrote:
> accidental delete?
No, there's a ``operator bool() `` on ``CallSite`` that basically checks ``isoneof<CallInst, InvolkeInst>(...)`` so I removed the duplicate here.


Repository:
  rL LLVM

https://reviews.llvm.org/D33125





More information about the llvm-commits mailing list