[PATCH] D105915: [CallSiteInfo][CallGraphSection] Extend CallSiteInfo for indirect call type ids

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 08:06:07 PDT 2021


morehouse added a comment.

Can we write a test?



================
Comment at: llvm/include/llvm/CodeGen/MachineFunction.h:435
+          Type *Int64Ty = Type::getInt64Ty(CB.getContext());
+          return cast<ConstantInt>(ConstantInt::get(Int64Ty, TypeIdVal));
+        }
----------------
The cast looks unneeded.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:813
 
+  auto CallFwdRegsInfo = CallSiteInfo->second.ArgRegPairs;
+
----------------
Nit:  This variable can go closer to where it is used (or remove entirely).


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:3946
+    }
+  }
+
----------------
This pattern looks pretty similar across all the architectures.  Can share more of this logic in `CallSiteInfo`?

Maybe a constructor that takes a `CallBase *` could do all of this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105915



More information about the llvm-commits mailing list