[PATCH] D106172: [clang][CallGraphSection] Add type id metadata to indirect call and targets

Necip Fazil Yildiran via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 16 11:43:56 PDT 2021


necipfazil created this revision.
Herald added subscribers: dexonsmith, hiraditya.
necipfazil requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

Create and add generalized type identifier metadata to indirect calls,
and to functions that may be target to indirect calls.

To avoid metadata loss, indirect callsite type identifier metadata are
carried with operand bundles.

Type identifiers will be used by the back-end to construct the call
graph section to precisely represent the possible targets for indirect calls.
The type information is deliberately pulled from the front-end to have extra
precision since some type information is lost at IR, and to ensure
consistent type identifiers between object files compiled at different
times (as C/C++ standards require language-level types to match).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106172

Files:
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/test/CodeGen/call-graph-section-1.cpp
  clang/test/CodeGen/call-graph-section-2.cpp
  clang/test/CodeGen/call-graph-section-3.cpp
  clang/test/CodeGen/call-graph-section.c
  llvm/include/llvm/IR/LLVMContext.h
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106172.359402.patch
Type: text/x-patch
Size: 19072 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210716/dbfad6e0/attachment.bin>


More information about the llvm-commits mailing list