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

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 19 12:44:06 PDT 2021


morehouse added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/MachineFunction.h:444
+      assert(isa<MDString>(TypeIdMD) && "invalid metadata type");
+      auto *TypeIdStr = cast<MDString>(TypeIdMD);
+      assert(TypeIdStr->getString().endswith(".generalized") &&
----------------
`cast` already has an `isa` assertion, so we can remove those here.

https://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates


================
Comment at: llvm/include/llvm/CodeGen/MachineFunction.h:451
+      IntegerType *Int64Ty = Type::getInt64Ty(CB.getContext());
+      return ConstantInt::get(Int64Ty, TypeIdVal, false);
+    }
----------------



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