[PATCH] D78343: [CallSite remova][Attributor] Replaces use of CallSite with CallBase. NFC

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 21:06:14 PDT 2020


mtrofin added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1830
 
-    for (int i = 0, e = CS.getNumArgOperands(); i < e; i++) {
+    for (int i = 0, e = CB->getNumArgOperands(); i < e; i++) {
 
----------------
Can we capitalize i and e - the lines are already changed anyway (change size stays almost the same)


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:2513
       /// FIXME: add more support.
-      ImmutableCallSite ICS(&RV);
-      if (!ICS)
+      const auto *CB = dyn_cast<CallBase>(&RV);
+      if (!CB)
----------------
I think this can move in the if check


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:6278
     if (HasArgAccesses) {
-      for (unsigned ArgNo = 0, e = ICS.getNumArgOperands(); ArgNo < e;
+      for (unsigned ArgNo = 0, e = CB->getNumArgOperands(); ArgNo < e;
            ++ArgNo) {
----------------
'e' here can be capitalized, it's not used elsewhere than this line either.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78343/new/

https://reviews.llvm.org/D78343





More information about the llvm-commits mailing list