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

2021-07-28 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil updated this revision to Diff 362652. necipfazil marked 2 inline comments as done. necipfazil added a comment. Fix nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105909/new/ https://reviews.llvm.org/D105909 Files: clang/lib/CodeGen

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2021-07-22 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil updated this revision to Diff 361091. necipfazil marked 10 inline comments as done. necipfazil added a comment. Fix nits in documentation and tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105907/new/ https://reviews.llvm.org/D10590

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

2021-07-22 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil marked an inline comment as done. necipfazil added inline comments. Comment at: llvm/include/llvm/IR/LLVMContext.h:97 OB_clang_arc_attachedcall = 6, // "clang.arc.attachedcall" +OB_type = 7, // "type" }; morehouse wrote: >

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

2021-07-22 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil updated this revision to Diff 360942. necipfazil added a comment. Verify type operand bundle usage - Check if type operand bundle id is drifted - Verify and complain if multiple type operand bundles are used - Add type operand bundle test to operand bundle verifier tests Repository:

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

2021-07-22 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil added a comment. @morehouse PTAL Comment at: llvm/include/llvm/IR/LLVMContext.h:97 OB_clang_arc_attachedcall = 6, // "clang.arc.attachedcall" +OB_type = 7, // "type" }; morehouse wrote: > Do we need to update `LLVMContex

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

2021-07-22 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil updated this revision to Diff 360875. necipfazil marked 2 inline comments as done. necipfazil added a comment. Fix lint Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105909/new/ https://reviews.llvm.org/D105909 Files: clang/lib/CodeGe

[PATCH] D105911: [CallGraphSection] Introduce CGSectionFuncComdatCreator pass

2021-07-17 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil abandoned this revision. necipfazil added a comment. In D105911#2878345 , @morehouse wrote: > Are comdats needed? Can we get proper dead stripping with just > `SHF_LINK_ORDER`? It looks like we can. I am abandoning this revision. I will shor

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2021-07-17 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil updated this revision to Diff 359592. necipfazil added a comment. Change call graph section layout - Changed the call graph section layout - Extended the example - Updated the documentation In the previous version, the call graph section layout was optimized for entries with unique ty

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

2021-07-16 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil added a comment. In D105909#2878378 , @morehouse wrote: > Also, have you looked into operand bundles > instead of metadata? I don't > know much about them, but they might help with the > optimi

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

2021-07-16 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil abandoned this revision. necipfazil added a comment. Please disregard this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106172/new/ https://reviews.llvm.org/D106172 ___ cfe-commits

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

2021-07-16 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
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 fu

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

2021-07-16 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil updated this revision to Diff 359401. necipfazil added a comment. Herald added subscribers: dexonsmith, hiraditya. Herald added a project: LLVM. Use operand bundles for callsite type ids - Use (unlossy) operand bundles for propagating indirect callsite type ids - No longer use type met

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2021-07-15 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil updated this revision to Diff 359010. necipfazil marked 2 inline comments as done. necipfazil added a comment. - test new clang flags - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105907/new/ https://reviews.llvm.org/D105907 Fi

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

2021-07-15 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil updated this revision to Diff 358996. necipfazil added a comment. - rebase - add C struct parameter test - add C++ tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105909/new/ https://reviews.llvm.org/D105909 Files: clang/lib/CodeG

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

2021-07-15 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2068 +EmittedMDIdGeneralized = true; + } + morehouse wrote: > This code also seems unnecessary as it puts metadata on function definitions. We need the metadata for mapping ind

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

2021-07-13 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil updated this revision to Diff 358505. necipfazil added a comment. Several review comments are addressed - Don't emit type metadata for Objective-C - Don't emit metadata for function definitions, which leads to duplicates - Improve the test case - Add C struct parameter test - Fix v

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

2021-07-13 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil added inline comments. Comment at: clang/lib/CodeGen/CGObjCMac.cpp:2288 +} + } morehouse wrote: > This is for Objective C? I don't think we care about Objective C. I will remove this. Comment at: clang/lib/CodeGen/CodeGenModu

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2021-07-13 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil updated this revision to Diff 358463. necipfazil added a comment. rebase, fix nits in docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105907/new/ https://reviews.llvm.org/D105907 Files: clang/docs/CallGraphSection.rst clang/inclu

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2021-07-13 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil added inline comments. Comment at: clang/docs/CallGraphSection.rst:58 + +A type identifier may be repeated in different entries. The id value 0 is +reserved for unknown and used for indirect targets with unknown type. morehouse wrote: > Why would a typ

[PATCH] D105911: [CallGraphSection] Introduce CGSectionFuncComdatCreator pass

2021-07-13 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil created this revision. necipfazil added reviewers: lattner, morehouse, kcc, llvm-commits. Herald added subscribers: ormris, hiraditya, mgorny. necipfazil requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: cfe-commits. Create comdats for fun

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

2021-07-13 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil created this revision. necipfazil added reviewers: rjmccall, rsmith, morehouse, kcc, llvm-commits, cfe-commits. necipfazil requested review of this revision. Herald added a project: clang. Create and add generalized type identifier metadata to indirect calls, and to functions that may

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2021-07-13 Thread Necip Fazil Yildiran via Phabricator via cfe-commits
necipfazil created this revision. necipfazil added reviewers: rsmith, morehouse, kcc, cfe-commits, llvm-commits. Herald added subscribers: ormris, dexonsmith, dang, hiraditya. necipfazil requested review of this revision. Herald added projects: clang, LLVM. This is the first of the patch series th