[llvm-branch-commits] Reapply "[Fuchsia][cmake] Allow using FatLTO when building runtimes" (#119252) (PR #121820)

2025-01-10 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/121820 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [libunwind] [libunwind][cmake] Compile _Unwind* routines with -fexceptions (PR #121819)

2025-01-10 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/121819 >From 9f952de3cb3e973f17121c057089a28bf4c6e5e0 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 6 Jan 2025 11:15:35 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8

[llvm-branch-commits] [libunwind] [libunwind][cmake] Compile _Unwind* routines with -fexceptions (PR #121819)

2025-01-10 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/121819 >From 9f952de3cb3e973f17121c057089a28bf4c6e5e0 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 6 Jan 2025 11:15:35 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8

[llvm-branch-commits] Reapply "[Fuchsia][cmake] Allow using FatLTO when building runtimes" (#119252) (PR #121820)

2025-01-10 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/121820 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] Reapply "[Fuchsia][cmake] Allow using FatLTO when building runtimes" (#119252) (PR #121820)

2025-01-10 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/121820 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] Reapply "[Fuchsia][cmake] Allow using FatLTO when building runtimes" (#119252) (PR #121820)

2025-01-14 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/121820 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] Reapply "[Fuchsia][cmake] Allow using FatLTO when building runtimes" (#119252) (PR #121820)

2025-01-14 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/121820 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] Reapply "[Fuchsia][cmake] Allow using FatLTO when building runtimes" (#119252) (PR #121820)

2025-01-16 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: @petrhosek I assume we'r good to reland this now that the RTSan and libunwind build fixes are in? https://github.com/llvm/llvm-project/pull/121820 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llv

[llvm-branch-commits] [clang][CallGraphSection] Type id metadata for indirect calls (PR #117036)

2025-03-18 Thread Paul Kirth via llvm-branch-commits
@@ -0,0 +1,95 @@ +// Tests that we assign appropriate identifiers to indirect calls and targets ilovepi wrote: can we get more descriptive file names than `call-graph-section-1` `call-graph-section-2`? For instance, its nice if you can tell which properties are

[llvm-branch-commits] [clang][CallGraphSection] Type id metadata for indirect calls (PR #117036)

2025-03-18 Thread Paul Kirth via llvm-branch-commits
@@ -2214,9 +2214,8 @@ CGObjCCommonMac::EmitMessageSend(CodeGen::CodeGenFunction &CGF, llvm::CallBase *CallSite; CGCallee Callee = CGCallee::forDirect(BitcastFn); - RValue rvalue = CGF.EmitCall(MSI.CallInfo, Callee, Return, ActualArgs, - &Cal

[llvm-branch-commits] [clang][CallGraphSection] Type id metadata for indirect calls (PR #117036)

2025-03-18 Thread Paul Kirth via llvm-branch-commits
@@ -6172,7 +6172,6 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, } if (CallOrInvoke) *CallOrInvoke = LocalCallOrInvoke; - ilovepi wrote: nit: unrelated https://github.com/llvm/llvm-project/pull/117036 ___

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Correct improper file paths in HTML output (PR #132103)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/132103?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Correct improper file paths in HTML output (PR #132103)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132103 >From 4fba6cff9cc3dc5b2a8eeedb8de0fded9178fcb3 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 19 Mar 2025 21:07:22 + Subject: [PATCH] [clang-doc] Correct improper file paths in HTML output In index.js

[llvm-branch-commits] [clang-tools-extra] [clang-doc][NFC] Remove unnecessary directory cleanup (PR #132101)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132101 >From df32792335aa51d040a536a7132bf7e9fadff558 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 19 Mar 2025 20:58:15 + Subject: [PATCH] [clang-doc][NFC] Remove unnecessary directory cleanup The tests al

[llvm-branch-commits] [clang-tools-extra] [clang-doc][NFC] Remove unnecessary directory cleanup (PR #132101)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132101 >From df32792335aa51d040a536a7132bf7e9fadff558 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 19 Mar 2025 20:58:15 + Subject: [PATCH] [clang-doc][NFC] Remove unnecessary directory cleanup The tests al

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Correct improper file paths in HTML output (PR #132103)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132103 >From 9293b4ce688b5e420e31e6b442be2f41233d2e1d Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 19 Mar 2025 21:07:22 + Subject: [PATCH] [clang-doc] Correct improper file paths in HTML output In index.js

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Correct improper file paths in HTML output (PR #132103)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132103 >From 9293b4ce688b5e420e31e6b442be2f41233d2e1d Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 19 Mar 2025 21:07:22 + Subject: [PATCH] [clang-doc] Correct improper file paths in HTML output In index.js

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Correct improper file paths in HTML output (PR #132103)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132103 >From 4fba6cff9cc3dc5b2a8eeedb8de0fded9178fcb3 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 19 Mar 2025 21:07:22 + Subject: [PATCH] [clang-doc] Correct improper file paths in HTML output In index.js

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Correct improper file paths in HTML output (PR #132103)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132103 >From f50f1a7bac5c0a91fb8280d4ee90139691f07f95 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 19 Mar 2025 21:07:22 + Subject: [PATCH] [clang-doc] Correct improper file paths in HTML output In index.js

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Correct improper file paths in HTML output (PR #132103)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132103 >From f50f1a7bac5c0a91fb8280d4ee90139691f07f95 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 19 Mar 2025 21:07:22 + Subject: [PATCH] [clang-doc] Correct improper file paths in HTML output In index.js

[llvm-branch-commits] [clang-tools-extra] [clang-doc][NFC] Remove unnecessary directory cleanup (PR #132101)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132101 >From c857982fa9162b37e34099bf20332cc0b22286ed Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 19 Mar 2025 20:58:15 + Subject: [PATCH] [clang-doc][NFC] Remove unnecessary directory cleanup The tests al

[llvm-branch-commits] [clang-tools-extra] [clang-doc][NFC] Remove unnecessary directory cleanup (PR #132101)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132101 >From c857982fa9162b37e34099bf20332cc0b22286ed Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 19 Mar 2025 20:58:15 + Subject: [PATCH] [clang-doc][NFC] Remove unnecessary directory cleanup The tests al

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Avoid deref of invalid std::optional (PR #131939)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/131939 >From ea338585014151fcc5806a1c39ad39e9cb35999a Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Tue, 18 Mar 2025 23:38:09 + Subject: [PATCH] [clang-doc] Avoid deref of invalid std::optional Since our existin

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Correct improper file paths in HTML output (PR #132103)

2025-03-20 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: ### Merge activity * **Mar 20, 5:02 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/132103). https://github.com/llvm/llvm-project/pull/132103

[llvm-branch-commits] [clang-tools-extra] [clang-doc][NFC] Remove unnecessary directory cleanup (PR #132101)

2025-03-20 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/132101?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [llvm] [llvm] Add option to emit `callgraph` section (PR #87574)

2025-03-17 Thread Paul Kirth via llvm-branch-commits
@@ -0,0 +1,93 @@ +# Test MIR printer and parser for type id field in callSites. It is used +# for propogating call site type identifiers to emit in the call graph section. + +# RUN: llc --call-graph-section %s -run-pass=none -o - | FileCheck %s +# CHECK: name: main +# CHECK: callS

[llvm-branch-commits] [llvm] [llvm] Add option to emit `callgraph` section (PR #87574)

2025-03-17 Thread Paul Kirth via llvm-branch-commits
@@ -496,6 +496,9 @@ class LLVM_ABI MachineFunction { struct CallSiteInfo { /// Vector of call argument and its forwarding register. SmallVector ArgRegPairs; + +/// Callee type id. +ConstantInt *TypeId = nullptr; ilovepi wrote: ```suggestion

[llvm-branch-commits] [llvm] [llvm] Extract and propagate indirect call type id (PR #87575)

2025-03-17 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi commented: LGTM on the RISC-V additions, but do follow through on @arsenm's comments before landing. https://github.com/llvm/llvm-project/pull/87575 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org htt

[llvm-branch-commits] [llvm] [llvm] Add option to emit `callgraph` section (PR #87574)

2025-03-17 Thread Paul Kirth via llvm-branch-commits
@@ -576,6 +576,9 @@ void MIRPrinter::convertCallSiteObjects(yaml::MachineFunction &YMF, printRegMIR(ArgReg.Reg, YmlArgReg.Reg, TRI); YmlCS.ArgForwardingRegs.emplace_back(YmlArgReg); } +// Get type id. +if (CSInfo.second.TypeId) + YmlCS.TypeId = CSI

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Avoid deref of invalid std::optional (PR #131939)

2025-03-18 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/131939?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Correct improper file paths in HTML output (PR #132103)

2025-03-19 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/132103 In index.js the logic of the ternary operator was backwards, preventing us from generating the correct file paths, or relative paths in the HTML output. >From 6182de900b039f86b564ecf8b74fce8f07317d28 Mon Sep 17

[llvm-branch-commits] [clang-tools-extra] [clang-doc][NFC] Remove unnecessary directory cleanup (PR #132101)

2025-04-05 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: ### Merge activity * **Mar 20, 5:02 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/132101). https://github.com/llvm/llvm-project/pull/132101

[llvm-branch-commits] [clang-tools-extra] [clang-doc][NFC] Remove unnecessary directory cleanup (PR #132101)

2025-04-05 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/132101 >From 3f09b51ea96344fe03a6ffd453d4fba48e700526 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Wed, 19 Mar 2025 20:58:15 + Subject: [PATCH] [clang-doc][NFC] Remove unnecessary directory cleanup The tests al

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-03-17 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: Is there documentation anywhere on the format being output via `--call-graph-section`? I get you're checking the MD5, but I'm also interested in if we're checking the output sufficiently. https://discourse.llvm.org/t/rfc-computing-storing-and-restoring-conservative-call-graphs-w

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-11 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/135457?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-11 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/135457 clang-doc didn't visit VarDecl, and hence never collected info from class statics members and functions. Fixes #59813. >From 4b02fd4b9043237a997f01b3fa814c6f172d98d8 Mon Sep 17 00:00:00 2001 From: Paul Kirth D

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-11 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/135457 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [llvm] release/20.x: [fatlto] Add coroutine passes when using FatLTO with ThinLTO (#134434) (PR #134711)

2025-04-07 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi approved this pull request. I think this makes sense to backport. https://github.com/llvm/llvm-project/pull/134711 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[llvm-branch-commits] [llvm] [llvm][IR] Treat memcmp and bcmp as libcalls (PR #135706)

2025-04-14 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/135706 Since the backend may emit calls to these functions, they should be treated like other libcalls. If we don't, then it is possible to have their definitions removed during LTO because they are dead, only to have a

[llvm-branch-commits] [llvm] [llvm][IR] Treat memcmp and bcmp as libcalls (PR #135706)

2025-04-14 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/135706 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-18 Thread Paul Kirth via llvm-branch-commits
@@ -1642,6 +1642,101 @@ void AsmPrinter::emitStackUsage(const MachineFunction &MF) { *StackUsageStream << "static\n"; } +/// Extracts a generalized numeric type identifier of a Function's type from +/// type metadata. Returns null if metadata cannot be found. +static Cons

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-18 Thread Paul Kirth via llvm-branch-commits
@@ -1642,6 +1642,101 @@ void AsmPrinter::emitStackUsage(const MachineFunction &MF) { *StackUsageStream << "static\n"; } +/// Extracts a generalized numeric type identifier of a Function's type from +/// type metadata. Returns null if metadata cannot be found. +static Cons

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-18 Thread Paul Kirth via llvm-branch-commits
@@ -1948,6 +2047,26 @@ void AsmPrinter::emitFunctionBody() { break; } + // FIXME: Some indirect calls can get lowered to jump instructions, + // resulting in emitting labels for them. The extra information can + // be neglected while disassembling

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-18 Thread Paul Kirth via llvm-branch-commits
@@ -1948,6 +2045,28 @@ void AsmPrinter::emitFunctionBody() { break; } + // FIXME: Some indirect calls can get lowered to jump instructions, + // resulting in emitting labels for them. The extra information can + // be neglected while disassembling

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-18 Thread Paul Kirth via llvm-branch-commits
@@ -0,0 +1,50 @@ +;; Tests that we store the type identifiers in .callgraph section of the binary. + +; RUN: llc --call-graph-section -filetype=obj -o - < %s | \ +; RUN: llvm-readelf -x .callgraph - | FileCheck %s + +declare void @foo() + +declare noundef i32 @bar(i8 signext) + +

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-18 Thread Paul Kirth via llvm-branch-commits
@@ -1642,6 +1642,101 @@ void AsmPrinter::emitStackUsage(const MachineFunction &MF) { *StackUsageStream << "static\n"; } +/// Extracts a generalized numeric type identifier of a Function's type from +/// type metadata. Returns null if metadata cannot be found. +static Cons

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-18 Thread Paul Kirth via llvm-branch-commits
@@ -0,0 +1,50 @@ +;; Tests that we store the type identifiers in .callgraph section of the binary. + +; RUN: llc --call-graph-section -filetype=obj -o - < %s | \ +; RUN: llvm-readelf -x .callgraph - | FileCheck %s + +declare void @foo() + +declare noundef i32 @bar(i8 signext) + +

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-18 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/87576 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-18 Thread Paul Kirth via llvm-branch-commits
@@ -0,0 +1,50 @@ +;; Tests that we store the type identifiers in .callgraph section of the binary. + +; RUN: llc --call-graph-section -filetype=obj -o - < %s | \ +; RUN: llvm-readelf -x .callgraph - | FileCheck %s + +declare void @foo() + +declare noundef i32 @bar(i8 signext) + +

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-18 Thread Paul Kirth via llvm-branch-commits
@@ -1642,6 +1642,101 @@ void AsmPrinter::emitStackUsage(const MachineFunction &MF) { *StackUsageStream << "static\n"; } +/// Extracts a generalized numeric type identifier of a Function's type from +/// type metadata. Returns null if metadata cannot be found. +static Cons

[llvm-branch-commits] [clang] callee_type metadata for indirect calls (PR #117036)

2025-04-22 Thread Paul Kirth via llvm-branch-commits
@@ -2873,14 +2890,33 @@ void CodeGenModule::CreateFunctionTypeMetadataForIcall(const FunctionDecl *FD, llvm::Metadata *MD = CreateMetadataIdentifierForType(FD->getType()); F->addTypeMetadata(0, MD); - F->addTypeMetadata(0, CreateMetadataIdentifierGeneralized(FD->getType(

[llvm-branch-commits] [clang] callee_type metadata for indirect calls (PR #117036)

2025-04-22 Thread Paul Kirth via llvm-branch-commits
@@ -2860,9 +2861,25 @@ static void setLinkageForGV(llvm::GlobalValue *GV, const NamedDecl *ND) { GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage); } +static bool HasExistingGeneralizedTypeMD(llvm::Function *F) { + llvm::MDNode *MD = F->getMetadata(llvm::LLVMContext

[llvm-branch-commits] [clang] callee_type metadata for indirect calls (PR #117036)

2025-04-22 Thread Paul Kirth via llvm-branch-commits
@@ -2860,9 +2861,25 @@ static void setLinkageForGV(llvm::GlobalValue *GV, const NamedDecl *ND) { GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage); } +static bool HasExistingGeneralizedTypeMD(llvm::Function *F) { ilovepi wrote: ```suggestion static

[llvm-branch-commits] [clang] callee_type metadata for indirect calls (PR #117036)

2025-04-22 Thread Paul Kirth via llvm-branch-commits
@@ -2873,14 +2890,33 @@ void CodeGenModule::CreateFunctionTypeMetadataForIcall(const FunctionDecl *FD, llvm::Metadata *MD = CreateMetadataIdentifierForType(FD->getType()); F->addTypeMetadata(0, MD); - F->addTypeMetadata(0, CreateMetadataIdentifierGeneralized(FD->getType(

[llvm-branch-commits] [clang] callee_type metadata for indirect calls (PR #117036)

2025-04-22 Thread Paul Kirth via llvm-branch-commits
@@ -0,0 +1,83 @@ +// Tests that we assign appropriate identifiers to indirect calls and targets. + ilovepi wrote: ```suggestion REQUIRES: x86-registered-target ``` I think you need a requires line here, if you're gong to set the triple. Or this could be under `C

[llvm-branch-commits] [clang] callee_type metadata for indirect calls (PR #117036)

2025-04-22 Thread Paul Kirth via llvm-branch-commits
@@ -0,0 +1,83 @@ +// Tests that we assign appropriate identifiers to indirect calls and targets. + +// RUN: %clang_cc1 -triple x86_64-unknown-linux -fcall-graph-section \ ilovepi wrote: Should this run w/ `-disable-llvm-passes`? https://github.com/llvm/llvm-proj

[llvm-branch-commits] [clang] callee_type metadata for indirect calls (PR #117036)

2025-04-22 Thread Paul Kirth via llvm-branch-commits
@@ -1622,6 +1622,9 @@ class CodeGenModule : public CodeGenTypeCache { void CreateFunctionTypeMetadataForIcall(const FunctionDecl *FD, llvm::Function *F); + /// Create and attach type metadata to the given call. + void CreateCalleeT

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-24 Thread Paul Kirth via llvm-branch-commits
@@ -1642,6 +1642,94 @@ void AsmPrinter::emitStackUsage(const MachineFunction &MF) { *StackUsageStream << "static\n"; } +/// Extracts a generalized numeric type identifier of a Function's type from +/// type metadata. Returns null if metadata cannot be found. +static Const

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-24 Thread Paul Kirth via llvm-branch-commits
@@ -68,6 +68,9 @@ class MCObjectFileInfo { /// Language Specific Data Area information is emitted to. MCSection *LSDASection = nullptr; + /// Section containing metadata on call graph. ilovepi wrote: ```suggestion /// Section containing call graph meta

[llvm-branch-commits] [llvm] [llvm][AsmPrinter] Emit call graph section (PR #87576)

2025-04-24 Thread Paul Kirth via llvm-branch-commits
@@ -0,0 +1,50 @@ +;; Tests that we store the type identifiers in .callgraph section of the binary. + +; RUN: llc --call-graph-section -filetype=obj -o - < %s | \ +; RUN: llvm-readelf -x .callgraph - | FileCheck %s ilovepi wrote: I don't see any tests under `test

[llvm-branch-commits] [clang] [clang] callee_type metadata for indirect calls (PR #117036)

2025-04-23 Thread Paul Kirth via llvm-branch-commits
@@ -1619,9 +1619,12 @@ class CodeGenModule : public CodeGenTypeCache { llvm::Metadata *CreateMetadataIdentifierGeneralized(QualType T); /// Create and attach type metadata to the given function. - void CreateFunctionTypeMetadataForIcall(const FunctionDecl *FD, + void cre

[llvm-branch-commits] [clang] [clang] callee_type metadata for indirect calls (PR #117036)

2025-04-23 Thread Paul Kirth via llvm-branch-commits
@@ -2860,9 +2861,25 @@ static void setLinkageForGV(llvm::GlobalValue *GV, const NamedDecl *ND) { GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage); } +static bool HasExistingGeneralizedTypeMD(llvm::Function *F) { + llvm::MDNode *MD = F->getMetadata(llvm::LLVMContext

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add Mustache template assets (PR #138059)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/138059?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-12 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/135457 >From 1e5adae44b8e8ebbb0438d1c5972f3937711954a Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 7 Apr 2025 08:37:40 -0700 Subject: [PATCH 1/4] [clang-doc] Handle static members and functions clang-doc didn'

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-12 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/135457 >From 1e4d789c7b45fbc17910d48602f314860e731350 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 7 Apr 2025 08:37:40 -0700 Subject: [PATCH 1/5] [clang-doc] Handle static members and functions clang-doc didn'

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-12 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/135457 >From 1e4d789c7b45fbc17910d48602f314860e731350 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 7 Apr 2025 08:37:40 -0700 Subject: [PATCH 1/5] [clang-doc] Handle static members and functions clang-doc didn'

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-12 Thread Paul Kirth via llvm-branch-commits
@@ -687,6 +687,62 @@ emitInfo(const RecordDecl *D, const FullComment *FC, int LineNumber, PopulateTemplateParameters(I->Template, D); + // Full and partial specializations. + if (auto *CTSD = dyn_cast(D)) { +if (!I->Template) + I->Template.emplace(); +I->Tem

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-12 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/135457 >From 1e5adae44b8e8ebbb0438d1c5972f3937711954a Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 7 Apr 2025 08:37:40 -0700 Subject: [PATCH 1/5] [clang-doc] Handle static members and functions clang-doc didn'

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-12 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/135457 >From 1e5adae44b8e8ebbb0438d1c5972f3937711954a Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 7 Apr 2025 08:37:40 -0700 Subject: [PATCH 1/3] [clang-doc] Handle static members and functions clang-doc didn'

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-11 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/135457 >From 1e5adae44b8e8ebbb0438d1c5972f3937711954a Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 7 Apr 2025 08:37:40 -0700 Subject: [PATCH 1/2] [clang-doc] Handle static members and functions clang-doc didn'

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Handle static members and functions (PR #135457)

2025-04-11 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/135457 >From 1e5adae44b8e8ebbb0438d1c5972f3937711954a Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 7 Apr 2025 08:37:40 -0700 Subject: [PATCH 1/2] [clang-doc] Handle static members and functions clang-doc didn'

[llvm-branch-commits] [llvm] [llvm][IR] Treat memcmp and bcmp as libcalls (PR #135706)

2025-04-16 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: First, thanks for the context. I don't see anything like this written down, so I plan to find some place in our docs to put those details. I'll be sure to CC you and other folks I think will have thoughts on the precise verbiage. The compiler's contract with libc is, from what I

[llvm-branch-commits] [llvm] [llvm][IR] Treat memcmp and bcmp as libcalls (PR #135706)

2025-04-16 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: hmm, that's an interesting direction. We were discussing this internally, and we were outlining some ideas along these lines, but I think you've articulated this quite a bit better than we have so far. I really like this idea of a "no-builtins" world, and transitioning the IR. I

[llvm-branch-commits] [llvm] [llvm][IR] Treat memcmp and bcmp as libcalls (PR #135706)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: @efriedma-quic We've been discussing the topic of LTOing libc quite a bit internally, and are currently sketching out how this could work. Unsurprisingly, there's quite a lot to think about in both the compiler and linker, and how the two combine in our different versions of LTO

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add helpers for Template config (PR #138062)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/138062 This patch adds or fills in some helper functions related to template setup when initializing the mustache backend. It was split from #133161. Co-authored-by: Peter Chou >From 77bb241f4c6d69e934296a54040e233f9

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator.cpp (PR #138060)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/138060?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Update serializer for improved template handling (PR #138065)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/138065 This patch updates Serialize.cpp to serialize more data about C++ templates, which are supported by the new mustache HTML template. Split from #133161. Co-authored-by: Peter Chou Rate l

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/138061?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Update clang-doc tool to enable mustache templates (PR #138066)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/138066 This patch adds a command line option and enables the Mustache template HTML backend. This allows users to use the new, more flexible templates over the old and cumbersome HTML output. Split from #133161. Co-aut

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add Mustache template assets (PR #138059)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/138059 This patch adds the various assets used with the HTML Mustache backend. This includes templates for a variety of different language constructs, as well as the CSS. Split from #133161. Co-authored-by: Peter Chou

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Extract Info into JSON values (PR #138063)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/138063 Split from #133161. This patch provides the implementation of a number of extractValue overloads used with the different types of Info. The new helper functions extract the relevant information from the differen

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Implement setupTemplateValue for HTMLMustacheGenerator (PR #138064)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/138064 This patch implements the business logic for setupTemplateValue, which was split from #133161. The implementation configures the relative path relationships between the various HTML components, and prepares them

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator.cpp (PR #138060)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/138060 Split from #133161. This patch adds HTMLMustacheGenerator.cpp, and the most basic class defintion for the generator. Future patches will add functionality. Co-authored-by: Peter Chou >From 397d5dc9657733afa951

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/138061 Split from #133161. This patch fills in the implementation for a number of the MustacheHTMLGenerator methods. Many of these APIs are just stubbed out, and will have their implementation filled in by later patches

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Track if a type is a template or builtin (PR #138067)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/138067 Originally part of #133161. This patch adds preliminary tracking for of TypeInfo, by tracking if the type is a builtin or template. The new functionality is not yet exercised. Co-authored-by: Peter Chou

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Update clang-doc tool to enable mustache templates (PR #138066)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/138066?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Implement setupTemplateValue for HTMLMustacheGenerator (PR #138064)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/138064?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Update serializer for improved template handling (PR #138065)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/138065?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add Mustache template assets (PR #138059)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/138059 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Track if a type is a template or builtin (PR #138067)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/138067?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Extract Info into JSON values (PR #138063)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/138063?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add helpers for Template config (PR #138062)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/138062?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add helpers for Template config (PR #138062)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/138062 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator.cpp (PR #138060)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/138060 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator methods (PR #138061)

2025-04-30 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi ready_for_review https://github.com/llvm/llvm-project/pull/138061 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Track if a type is a template or builtin (PR #138067)

2025-05-01 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: @PeterChou1 can you provide some context about how you originally expected these fields to be used/consumed? Here we bake them into the representation and serialize them, but I don't see any handling of them in the original patch. How should they be used by the different backend

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add Mustache template assets (PR #138059)

2025-05-01 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: I appreciate this is a lot of CSS and templates. I have this here in the stack, so that hopefully I can leverage these to bootstrap unittests for the HTMLMustacheGenerator in subsequent patches. https://github.com/llvm/llvm-project/pull/138059 ___

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add HTMLMustacheGenerator.cpp (PR #138060)

2025-05-01 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: Testing in this patch will have to be limited to unit tests, if we can bootstrap anything at all. https://github.com/llvm/llvm-project/pull/138060 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llv

[llvm-branch-commits] [clang-tools-extra] [clang-doc] Update clang-doc tool to enable mustache templates (PR #138066)

2025-05-01 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: I'm wondering if this should be earlier in the stack to facilitate better testing. https://github.com/llvm/llvm-project/pull/138066 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[llvm-branch-commits] [clang] [clang] Introduce CallGraphSection option (PR #117037)

2025-04-23 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi approved this pull request. LGTM once all the dependent patches are landed. https://github.com/llvm/llvm-project/pull/117037 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-

<    1   2   3   4   5   6   7   8   >