[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-05 Thread Ellis Hoag via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[clang-tools-extra] [compiler-rt] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-07 Thread Ellis Hoag via cfe-commits
@@ -1,39 +1,45 @@ -; Do setup work for all below tests: generate bitcode and combined index -; RUN: opt -module-summary %s -o %t.bc -; RUN: opt -module-summary %p/Inputs/thinlto_indirect_call_promotion.ll -o %t2.bc +; The raw profiles and reduced IR inputs are generated from Inp

[llvm] [clang-tools-extra] [compiler-rt] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-07 Thread Ellis Hoag via cfe-commits
ellishg wrote: Please remember to remove the binaries that are not used. https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang-tools-extra] [compiler-rt] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-07 Thread Ellis Hoag via cfe-commits
@@ -1,39 +1,45 @@ -; Do setup work for all below tests: generate bitcode and combined index -; RUN: opt -module-summary %s -o %t.bc -; RUN: opt -module-summary %p/Inputs/thinlto_indirect_call_promotion.ll -o %t2.bc +; The raw profiles and reduced IR inputs are generated from Inp

[clang-tools-extra] [compiler-rt] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-08 Thread Ellis Hoag via cfe-commits
@@ -1,39 +1,45 @@ -; Do setup work for all below tests: generate bitcode and combined index -; RUN: opt -module-summary %s -o %t.bc -; RUN: opt -module-summary %p/Inputs/thinlto_indirect_call_promotion.ll -o %t2.bc +; The raw profiles and reduced IR inputs are generated from Inp

[clang] [llvm] [SpecialCaseList] Use glob by default (PR #74809)

2023-12-08 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg approved this pull request. Looks good to me. Thanks for following up! https://github.com/llvm/llvm-project/pull/74809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[llvm] [clang] [SpecialCaseList] Use glob by default (PR #74809)

2023-12-08 Thread Ellis Hoag via cfe-commits
ellishg wrote: > Probably would be good to introduce the `-v1` version and require it first, > then eventually change the default - so people don't get a silent behavior > change? Even the existing users only using `*` and `.` need to change their > syntax to migrate to v2, right? They'll need

[llvm] [compiler-rt] [clang-tools-extra] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-08 Thread Ellis Hoag via cfe-commits
@@ -1,39 +1,45 @@ -; Do setup work for all below tests: generate bitcode and combined index -; RUN: opt -module-summary %s -o %t.bc -; RUN: opt -module-summary %p/Inputs/thinlto_indirect_call_promotion.ll -o %t2.bc +; The raw profiles and reduced IR inputs are generated from Inp

[clang] [NFC] Fix CSPGO clang pass manager test (PR #72681)

2023-11-17 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg created https://github.com/llvm/llvm-project/pull/72681 Fix a `CHECK-NOT` line in a cspgo clang test >From f548c66f5084e9ce57565b6acc6f6caae0f89a8a Mon Sep 17 00:00:00 2001 From: Ellis Hoag Date: Fri, 17 Nov 2023 09:40:34 -0800 Subject: [PATCH] [NFC] Fix CSPGO clang

[clang] [NFC] Fix CSPGO clang pass manager test (PR #72681)

2023-11-17 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg closed https://github.com/llvm/llvm-project/pull/72681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Profile] Refactor profile correlation. (PR #69656)

2023-10-30 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg approved this pull request. https://github.com/llvm/llvm-project/pull/69656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [llvm] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-10-31 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg approved this pull request. Sounds fine to me, but I guess I don't understand why `-profile-correlate=` doesn't work. Do you still plan to add the flag later? https://github.com/llvm/llvm-project/pull/70856 ___ cfe-commits m

[compiler-rt] [llvm] [clang] [InstrProf] Single byte counters in coverage (PR #75425)

2023-12-14 Thread Ellis Hoag via cfe-commits
@@ -821,15 +822,23 @@ void InstrProfRecord::merge(InstrProfRecord &Other, uint64_t Weight, for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) { bool Overflowed; -uint64_t Value = -SaturatingMultiplyAdd(Other.Counts[I], Weight, Counts[I], &Overflowed); -

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Ellis Hoag via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Ellis Hoag via cfe-commits
@@ -246,11 +246,27 @@ std::string InstrProfError::message() const { char InstrProfError::ID = 0; -std::string getPGOFuncName(StringRef RawFuncName, - GlobalValue::LinkageTypes Linkage, +std::string getPGOFuncName(StringRef Name, GlobalValue::LinkageT

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Ellis Hoag via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Ellis Hoag via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Ellis Hoag via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-01 Thread Ellis Hoag via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[clang] [clang-tools-extra] [compiler-rt] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -25,6 +25,25 @@ // RUN: diff <(llvm-profdata show --all-functions --counts %t.cov.normal.profdata) <(llvm-profdata show --all-functions --counts %t.cov.profdata) +// Test debug info correlate with build id. ellishg wrote: Can you add a test to `Darwin/i

[compiler-rt] [clang] [clang-tools-extra] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available ellishg wrote: Why is lld required? https://github.com/llvm/llvm-project/pull/75957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [clang-tools-extra] [compiler-rt] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available +// Test llvm-profdata merging with multiple correlation files mixing different correlation modes. + +// RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instr

[llvm] [clang-tools-extra] [clang] [compiler-rt] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[clang] [compiler-rt] [llvm] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available +// Test llvm-profdata merging with multiple correlation files mixing different correlation modes. + +// RUN: %clang_pgogen -o %t.normal -mllvm --disable-vp=true %S/../Inputs/instrprof-debug-info-correlate-main.cpp %S/../Inputs/instr

[compiler-rt] [llvm] [clang-tools-extra] [clang] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -481,3 +509,49 @@ Error BinaryInstrProfCorrelator::correlateProfileNameImpl() { this->Names.append(this->Ctx->NameStart, this->Ctx->NameSize); return Error::success(); } + +llvm::Expected> InstrProfCorrelators::get( +ArrayRef> +CorrelateInputs, +uint32_

[clang] [clang-tools-extra] [compiler-rt] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available ellishg wrote: Can we also add a test to `Darwin/instrprof-correlation-mixed.test`? https://github.com/llvm/llvm-project/pull/75957 ___ cfe-commits mailing list cfe-commits@

[clang-tools-extra] [compiler-rt] [clang] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -481,3 +509,49 @@ Error BinaryInstrProfCorrelator::correlateProfileNameImpl() { this->Names.append(this->Ctx->NameStart, this->Ctx->NameSize); return Error::success(); } + +llvm::Expected> InstrProfCorrelators::get( +ArrayRef> +CorrelateInputs, +uint32_

[clang-tools-extra] [clang] [llvm] [compiler-rt] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[clang-tools-extra] [clang] [llvm] [compiler-rt] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Ellis Hoag via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[clang] [llvm] [SpecialCaseList] Use glob by default (PR #74809)

2024-01-05 Thread Ellis Hoag via cfe-commits
ellishg wrote: > This caused some ignorelist changes, e.g. > > > > `src:*third_party/vulkan_memory_allocator/include/vk_mem_alloc.h` > > > > didn't work anymore and the opt-out made it work again. Still investigating > why. Not sure if it's the reason, but the `.` in `vk_mem_alloc.h` matc

[clang] 12e78ff - [InstrProf] Add the skipprofile attribute

2022-08-04 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2022-08-04T08:45:27-07:00 New Revision: 12e78ff88105f2dc6cb1449d6fcd5d8f69e0512f URL: https://github.com/llvm/llvm-project/commit/12e78ff88105f2dc6cb1449d6fcd5d8f69e0512f DIFF: https://github.com/llvm/llvm-project/commit/12e78ff88105f2dc6cb1449d6fcd5d8f69e0512f.diff LO

[clang] b692312 - [InstrProf] Add new format for -fprofile-list=

2022-08-04 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2022-08-04T08:49:43-07:00 New Revision: b692312ca432d9a379f67a8d83177a6f1722baaa URL: https://github.com/llvm/llvm-project/commit/b692312ca432d9a379f67a8d83177a6f1722baaa DIFF: https://github.com/llvm/llvm-project/commit/b692312ca432d9a379f67a8d83177a6f1722baaa.diff LO

[clang] 6f4c3c0 - [InstrProf][attempt 2] Add new format for -fprofile-list=

2022-08-04 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2022-08-04T17:12:56-07:00 New Revision: 6f4c3c0f6463880b685bfbca1932c06fd0c1f015 URL: https://github.com/llvm/llvm-project/commit/6f4c3c0f6463880b685bfbca1932c06fd0c1f015 DIFF: https://github.com/llvm/llvm-project/commit/6f4c3c0f6463880b685bfbca1932c06fd0c1f015.diff LO

[clang] af58684 - [InstrProf] Add options to profile function groups

2022-07-14 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2022-07-14T11:41:30-07:00 New Revision: af58684f272046f293a9f469f03d23bd2b138349 URL: https://github.com/llvm/llvm-project/commit/af58684f272046f293a9f469f03d23bd2b138349 DIFF: https://github.com/llvm/llvm-project/commit/af58684f272046f293a9f469f03d23bd2b138349.diff LO

[clang] [llvm] [SpecialCaseList] Use glob by default (PR #74809)

2024-03-14 Thread Ellis Hoag via cfe-commits
ellishg wrote: > A report from the field: we had an ignorelist that contained > `[cfi-vcall|cfi-nvcall|cfi-icall]`. This was recommended syntax from the > documentation > (https://releases.llvm.org/17.0.1/tools/clang/docs/SanitizerSpecialCaseList.html)... > but it broke with the transition.

[clang] [clang-tools-extra] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] Fix SyntaxWarning messages from python 3.12 (PR #86806)

2024-03-27 Thread Ellis Hoag via cfe-commits
@@ -101,7 +101,7 @@ def extract_result_types(comment): def strip_doxygen(comment): -"""Returns the given comment without \-escaped words.""" +"""Returns the given comment without \\-escaped words.""" ellishg wrote: I see lots of changes to comment bl

[compiler-rt] [clang] [clang-tools-extra] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2024-01-17 Thread Ellis Hoag via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[llvm] [clang] [clang-tools-extra] [compiler-rt] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2024-01-18 Thread Ellis Hoag via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-18 Thread Ellis Hoag via cfe-commits
@@ -60,10 +60,7 @@ using namespace llvm; #define DEBUG_TYPE "instrprof" namespace llvm { -cl::opt -DebugInfoCorrelate("debug-info-correlate", - cl::desc("Use debug info to correlate profiles."), - cl::init(false)); --

[clang] [Clang][InstrProf] Allow absolute path in fun.list of -fprofile-list= (PR #67519)

2023-10-19 Thread Ellis Hoag via cfe-commits
@@ -139,9 +139,23 @@ std::optional ProfileList::isFileExcluded(StringRef FileName, CodeGenOptions::ProfileInstrKind Kind) const { StringRef Section = getSectionName(Kind); - // Check for "source:=" + + // Convert the input file path to its canoni

[clang] [Profile] Refactor profile correlation. (PR #69656)

2023-10-23 Thread Ellis Hoag via cfe-commits
@@ -24,15 +24,37 @@ using namespace llvm; -/// Get the __llvm_prf_cnts section. -Expected getCountersSection(const object::ObjectFile &Obj) { +namespace llvm { +// Deprecated. Use -profile-correlate=debug-info. +cl::opt +DebugInfoCorrelate("profile-correlate=debug-info",

[clang] [Profile] Refactor profile correlation. (PR #69656)

2023-10-24 Thread Ellis Hoag via cfe-commits
@@ -24,15 +24,38 @@ using namespace llvm; -/// Get the __llvm_prf_cnts section. -Expected getCountersSection(const object::ObjectFile &Obj) { +namespace llvm { +// Deprecated. Use -profile-correlate=debug-info. +cl::opt DebugInfoCorrelate( +"debug-info-correlate", +c

[clang] [Profile] Refactor profile correlation. (PR #69656)

2023-10-24 Thread Ellis Hoag via cfe-commits
@@ -55,6 +56,7 @@ #include "llvm/Target/TargetOptions.h" #include "llvm/TargetParser/SubtargetFeature.h" #include "llvm/TargetParser/Triple.h" +#include "llvm/Transforms/HipStdPar/HipStdPar.h" ellishg wrote: Is this include used? https://github.com/llvm/llvm-

[clang] [Profile] Refactor profile correlation. (PR #69656)

2023-10-25 Thread Ellis Hoag via cfe-commits
@@ -24,15 +24,38 @@ using namespace llvm; -/// Get the __llvm_prf_cnts section. -Expected getCountersSection(const object::ObjectFile &Obj) { +namespace llvm { +// Deprecated. Use -profile-correlate=debug-info. +cl::opt DebugInfoCorrelate( +"debug-info-correlate", +c

[clang] 970e1ea - [clang] Fix crash with -funique-internal-linkage-names

2022-10-17 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2022-10-17T08:57:23-07:00 New Revision: 970e1ea01aa0dce4f606eee1610c92b8b838f303 URL: https://github.com/llvm/llvm-project/commit/970e1ea01aa0dce4f606eee1610c92b8b838f303 DIFF: https://github.com/llvm/llvm-project/commit/970e1ea01aa0dce4f606eee1610c92b8b838f303.diff LO

[clang] 9e11d68 - Improve reliability of CompilationDatabaseTest

2023-08-14 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2023-08-14T13:46:21-07:00 New Revision: 9e11d6850a5a5a3518f300769724a5c13d2e6ec6 URL: https://github.com/llvm/llvm-project/commit/9e11d6850a5a5a3518f300769724a5c13d2e6ec6 DIFF: https://github.com/llvm/llvm-project/commit/9e11d6850a5a5a3518f300769724a5c13d2e6ec6.diff LO

[clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2023-10-16 Thread Ellis Hoag via cfe-commits
@@ -1127,6 +1134,11 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, if (EnableSyntheticCounts && !PGOOpt) MPM.addPass(SyntheticCountsPropagation()); + if (EnableMarkColdFunctions && PGOOpt && + (PGOOpt->Action == PGOOptions::SampleUse ||

[clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2023-10-16 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,28 @@ +//===- MarkColdFunctions.h - *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] 8eb3470 - [SpecialCaseList] Add option to use Globs instead of Regex to match patterns

2023-09-01 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2023-09-01T09:06:11-07:00 New Revision: 8eb34700c2b1847ec6dfb8f92b305b65278d2ec0 URL: https://github.com/llvm/llvm-project/commit/8eb34700c2b1847ec6dfb8f92b305b65278d2ec0 DIFF: https://github.com/llvm/llvm-project/commit/8eb34700c2b1847ec6dfb8f92b305b65278d2ec0.diff LO

[clang] 85af42d - [lld] add context-sensitive PGO options for MachO

2023-05-31 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2023-05-31T17:53:46-07:00 New Revision: 85af42df5dbb964d767feb16a5551dddb36fd4f1 URL: https://github.com/llvm/llvm-project/commit/85af42df5dbb964d767feb16a5551dddb36fd4f1 DIFF: https://github.com/llvm/llvm-project/commit/85af42df5dbb964d767feb16a5551dddb36fd4f1.diff LO

[clang] bf8fe1c - Fix clang driver tests for cspgo in lld

2023-05-31 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2023-05-31T18:21:41-07:00 New Revision: bf8fe1c38f1031c88c80e0e86ffea4375e7693ff URL: https://github.com/llvm/llvm-project/commit/bf8fe1c38f1031c88c80e0e86ffea4375e7693ff DIFF: https://github.com/llvm/llvm-project/commit/bf8fe1c38f1031c88c80e0e86ffea4375e7693ff.diff LO

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-14 Thread Ellis Hoag via cfe-commits
@@ -821,15 +822,23 @@ void InstrProfRecord::merge(InstrProfRecord &Other, uint64_t Weight, for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) { bool Overflowed; -uint64_t Value = -SaturatingMultiplyAdd(Other.Counts[I], Weight, Counts[I], &Overflowed); -

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-14 Thread Ellis Hoag via cfe-commits
@@ -821,15 +822,23 @@ void InstrProfRecord::merge(InstrProfRecord &Other, uint64_t Weight, for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) { bool Overflowed; -uint64_t Value = -SaturatingMultiplyAdd(Other.Counts[I], Weight, Counts[I], &Overflowed); -

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-15 Thread Ellis Hoag via cfe-commits
ellishg wrote: LGTM, but I'm less familiar with the clang coverage code. So I'll give others some time to accept. https://github.com/llvm/llvm-project/pull/75425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [CGData] Clang Options (PR #90304)

2024-09-11 Thread Ellis Hoag via cfe-commits
@@ -1894,6 +1894,18 @@ def fprofile_selected_function_group : Visibility<[ClangOption, CC1Option]>, MetaVarName<"">, HelpText<"Partition functions into N groups using -fprofile-function-groups and select only functions in group i to be instrumented. The valid range is 0 to

[clang] [modules] Accept equivalent module caches from different symlink (PR #90925)

2024-05-02 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg created https://github.com/llvm/llvm-project/pull/90925 Use `fs::equivalent()`, which follows symlinks, to check if two module cache paths are equivalent. This prevents a PCH error when building from a different path that is a symlink of the original. ``` error: PCH

[clang] [modules] Accept equivalent module caches from different symlink (PR #90925)

2024-05-03 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg updated https://github.com/llvm/llvm-project/pull/90925 >From 4760ebce0ff7725f4bb75f5107f551d867e4db6d Mon Sep 17 00:00:00 2001 From: Ellis Hoag Date: Thu, 2 May 2024 17:47:38 -0700 Subject: [PATCH 1/2] [modules] Accept equivalent module caches from different symlink

[clang] [llvm] [modules] Accept equivalent module caches from different symlink (PR #90925)

2024-05-03 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg updated https://github.com/llvm/llvm-project/pull/90925 >From 4760ebce0ff7725f4bb75f5107f551d867e4db6d Mon Sep 17 00:00:00 2001 From: Ellis Hoag Date: Thu, 2 May 2024 17:47:38 -0700 Subject: [PATCH 1/3] [modules] Accept equivalent module caches from different symlink

[clang] [llvm] [modules] Accept equivalent module caches from different symlink (PR #90925)

2024-05-03 Thread Ellis Hoag via cfe-commits
@@ -839,17 +839,15 @@ static bool checkHeaderSearchOptions(const HeaderSearchOptions &HSOpts, DiagnosticsEngine *Diags, const LangOptions &LangOpts, const Preprocesso

[clang] [llvm] [modules] Accept equivalent module caches from different symlink (PR #90925)

2024-05-07 Thread Ellis Hoag via cfe-commits
ellishg wrote: @benlangmuir do you have other concerns? Can I get a stamp? https://github.com/llvm/llvm-project/pull/90925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [modules] Accept equivalent module caches from different symlink (PR #90925)

2024-05-07 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg updated https://github.com/llvm/llvm-project/pull/90925 >From 4760ebce0ff7725f4bb75f5107f551d867e4db6d Mon Sep 17 00:00:00 2001 From: Ellis Hoag Date: Thu, 2 May 2024 17:47:38 -0700 Subject: [PATCH 1/4] [modules] Accept equivalent module caches from different symlink

[clang] [llvm] [modules] Accept equivalent module caches from different symlink (PR #90925)

2024-05-07 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg edited https://github.com/llvm/llvm-project/pull/90925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [modules] Accept equivalent module caches from different symlink (PR #90925)

2024-05-07 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg closed https://github.com/llvm/llvm-project/pull/90925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4f61749 - [clang] support relative roots to vfs overlays

2022-01-19 Thread Ellis Hoag via cfe-commits
Author: Richard Howell Date: 2022-01-19T10:13:06-08:00 New Revision: 4f61749e16f63b0c9ebd9bdd1f8bf4f570a31692 URL: https://github.com/llvm/llvm-project/commit/4f61749e16f63b0c9ebd9bdd1f8bf4f570a31692 DIFF: https://github.com/llvm/llvm-project/commit/4f61749e16f63b0c9ebd9bdd1f8bf4f570a31692.diff

[clang] e27b5f9 - [clang][AST] Fix crash when printing error

2022-01-02 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2022-01-02T18:03:42-08:00 New Revision: e27b5f9371382952eb5482ad151bb6fcb4cd0d7c URL: https://github.com/llvm/llvm-project/commit/e27b5f9371382952eb5482ad151bb6fcb4cd0d7c DIFF: https://github.com/llvm/llvm-project/commit/e27b5f9371382952eb5482ad151bb6fcb4cd0d7c.diff LO

[clang] 800bf8e - [InstrProf] Attach debug info to counters

2021-12-13 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2021-12-13T17:51:22-08:00 New Revision: 800bf8ed29fbcaa9436540e83bc119ec92e7d40f URL: https://github.com/llvm/llvm-project/commit/800bf8ed29fbcaa9436540e83bc119ec92e7d40f DIFF: https://github.com/llvm/llvm-project/commit/800bf8ed29fbcaa9436540e83bc119ec92e7d40f.diff LO

[clang] c809da7 - Revert "[InstrProf] Attach debug info to counters"

2021-12-13 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2021-12-13T18:15:17-08:00 New Revision: c809da7d9ce78a463f9c5e38a9bf7b4c22b232de URL: https://github.com/llvm/llvm-project/commit/c809da7d9ce78a463f9c5e38a9bf7b4c22b232de DIFF: https://github.com/llvm/llvm-project/commit/c809da7d9ce78a463f9c5e38a9bf7b4c22b232de.diff LO

[clang] 58d9c1a - [Try2][InstrProf] Attach debug info to counters

2021-12-16 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2021-12-16T14:20:30-08:00 New Revision: 58d9c1aec88d5d4c783643df057d87f6b0c9f693 URL: https://github.com/llvm/llvm-project/commit/58d9c1aec88d5d4c783643df057d87f6b0c9f693 DIFF: https://github.com/llvm/llvm-project/commit/58d9c1aec88d5d4c783643df057d87f6b0c9f693.diff LO

[clang] ac719d7 - [InstrProf] Don't profile merge by default in lightweight mode

2021-12-20 Thread Ellis Hoag via cfe-commits
Author: Ellis Hoag Date: 2021-12-20T09:51:49-08:00 New Revision: ac719d7c9ae6a20a6ae530e308331b3d51b3d70e URL: https://github.com/llvm/llvm-project/commit/ac719d7c9ae6a20a6ae530e308331b3d51b3d70e DIFF: https://github.com/llvm/llvm-project/commit/ac719d7c9ae6a20a6ae530e308331b3d51b3d70e.diff LO

[clang] [CGData] Clang Options (PR #90304)

2024-09-12 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg commented: Can we add some documentation to https://github.com/llvm/llvm-project/blob/main/clang/docs/UsersManual.rst? This could also be a separate PR. LGTM, but I want to give others a chance to review. https://github.com/llvm/llvm-project/pull/90304 _

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-08 Thread Ellis Hoag via cfe-commits
@@ -1119,6 +1125,18 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, // removed. MPM.addPass( PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */)); + +if (InstrumentSampleColdFuncPath.getNumOccurrences() && +

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-09 Thread Ellis Hoag via cfe-commits
@@ -1891,6 +1914,12 @@ static bool skipPGOGen(const Function &F) { return true; if (F.getInstructionCount() < PGOFunctionSizeThreshold) return true; + if (InstrumentColdFunctionCoverage) { +if (!F.getEntryCount()) + return InstrumentColdFunctionCoverageMode

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-09 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg approved this pull request. The backend looks good to me! (after resolving my last comments of course) Thanks for adding this feature! https://github.com/llvm/llvm-project/pull/109837 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-09 Thread Ellis Hoag via cfe-commits
@@ -319,6 +319,29 @@ static cl::opt PGOFunctionCriticalEdgeThreshold( cl::desc("Do not instrument functions with the number of critical edges " " greater than this threshold.")); +static cl::opt ColdFuncCoverageMaxEntryCount( +"cold-function-coverage-max-e

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-09 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg edited https://github.com/llvm/llvm-project/pull/109837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-01 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,24 @@ +; RUN: opt < %s --passes=pgo-instr-gen -instrument-cold-function-coverage -S | FileCheck --check-prefixes=COLD %s +; RUN: opt < %s --passes=pgo-instr-gen -instrument-cold-function-coverage -cold-function-coverage-max-entry-count=1 -S | FileCheck --check-pr

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-01 Thread Ellis Hoag via cfe-commits
@@ -649,6 +649,24 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, } } + if (auto *ColdFuncCoverageArg = Args.getLastArg( + options::OPT_fprofile_generate_cold_function_coverage, + options::OPT_fprofile_generate_cold_function

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-01 Thread Ellis Hoag via cfe-commits
@@ -1119,6 +1125,18 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, // removed. MPM.addPass( PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */)); + +if (InstrumentSampleColdFuncPath.getNumOccurrences() && +

[clang] [CGObjC] Use llvm::isKnownNonZero to determine if receiver can be null. (PR #114914)

2024-11-04 Thread Ellis Hoag via cfe-commits
ellishg wrote: Yeah it seems good to me, but we should have a test case too https://github.com/llvm/llvm-project/pull/114914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-09-25 Thread Ellis Hoag via cfe-commits
@@ -48,6 +49,63 @@ Example $ clang -fsanitize=address -fsanitize-ignorelist=ignorelist.txt foo.c ; ./a.out # No error report here. +Usage with UndefinedBehaviorSanitizer += + +The arithmetic overflow sanitizers ``unsigned-integer-overfl

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-01 Thread Ellis Hoag via cfe-commits
ellishg wrote: Why not use the existing `-pgo-function-entry-coverage` (https://discourse.llvm.org/t/instrprofiling-lightweight-instrumentation/59113/14?u=ellishg) LLVM flag? It takes advantage of the `llvm.instrprof.cover` intrinsic which has less size and runtime overhead than `llvm.instrpro

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-01 Thread Ellis Hoag via cfe-commits
ellishg wrote: > > Why not use the existing `-pgo-function-entry-coverage` > > (https://discourse.llvm.org/t/instrprofiling-lightweight-instrumentation/59113/14?u=ellishg) > > LLVM flag? It takes advantage of the `llvm.instrprof.cover` intrinsic > > which has less size and runtime overhead tha

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-01 Thread Ellis Hoag via cfe-commits
@@ -0,0 +1,12 @@ +// Test -fprofile-generate-cold-function-coverage +// RUN: %clang -O2 -fprofile-generate-cold-function-coverage=/xxx/yyy/ -fprofile-sample-accurate -fprofile-sample-use=%S/Inputs/pgo-cold-func.prof -S -emit-llvm -o - %s | FileCheck %s ellishg

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Ellis Hoag via cfe-commits
@@ -1119,6 +1125,18 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, // removed. MPM.addPass( PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */)); + +if (InstrumentSampleColdFuncPath.getNumOccurrences() && +

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-02 Thread Ellis Hoag via cfe-commits
@@ -1119,6 +1125,18 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, // removed. MPM.addPass( PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */)); + +if (InstrumentSampleColdFuncPath.getNumOccurrences() && +

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-17 Thread Ellis Hoag via cfe-commits
@@ -164,6 +164,22 @@ publishOutlinedHashTree(std::unique_ptr HashTree) { CodeGenData::getInstance().publishOutlinedHashTree(std::move(HashTree)); } +/// Initialize the two-codegen rounds. +void initializeTwoCodegenRounds(); + +/// Save the current module before the first co

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-17 Thread Ellis Hoag via cfe-commits
@@ -164,6 +164,22 @@ publishOutlinedHashTree(std::unique_ptr HashTree) { CodeGenData::getInstance().publishOutlinedHashTree(std::move(HashTree)); } +/// Initialize the two-codegen rounds. ellishg wrote: This comment isn't very useful (thanks to the functio

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-17 Thread Ellis Hoag via cfe-commits
@@ -215,6 +224,76 @@ void warn(Error E, StringRef Whence) { } } +static std::string getPath(StringRef Dir, unsigned Task) { + return (Dir + "/" + llvm::Twine(Task) + ".saved_copy.bc").str(); ellishg wrote: Will this work on windows? Can we use `llvm::sys::

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-17 Thread Ellis Hoag via cfe-commits
@@ -164,6 +164,22 @@ publishOutlinedHashTree(std::unique_ptr HashTree) { CodeGenData::getInstance().publishOutlinedHashTree(std::move(HashTree)); } +/// Initialize the two-codegen rounds. +void initializeTwoCodegenRounds(); + +/// Save the current module before the first co

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-17 Thread Ellis Hoag via cfe-commits
ellishg wrote: Oh I just saw that you have dependent changes in https://github.com/llvm/llvm-project/pull/90934. I think when you create your PR, you can specify a base branch. If you select the branch for https://github.com/llvm/llvm-project/pull/90934, I believe it won't show those changes

[clang] Deprecate order file instrumentation (PR #121514)

2025-01-06 Thread Ellis Hoag via cfe-commits
@@ -8010,15 +8010,19 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } - if (Args.hasArg(options::OPT_forder_file_instrumentation)) { - CmdArgs.push_back("-forder-file-instrumentation"); - // Enable order file instrumentation when ThinLTO is

[clang] Deprecate order file instrumentation (PR #121514)

2025-01-03 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg closed https://github.com/llvm/llvm-project/pull/121514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Deprecate order file instrumentation (PR #121514)

2025-01-07 Thread Ellis Hoag via cfe-commits
@@ -8010,15 +8010,19 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } - if (Args.hasArg(options::OPT_forder_file_instrumentation)) { - CmdArgs.push_back("-forder-file-instrumentation"); - // Enable order file instrumentation when ThinLTO is

[clang] Deprecate order file instrumentation (PR #121514)

2025-01-08 Thread Ellis Hoag via cfe-commits
@@ -8010,15 +8010,19 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } - if (Args.hasArg(options::OPT_forder_file_instrumentation)) { - CmdArgs.push_back("-forder-file-instrumentation"); - // Enable order file instrumentation when ThinLTO is

[clang] [InstrProf] Fix format issue in user manual (PR #122559)

2025-01-10 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg closed https://github.com/llvm/llvm-project/pull/122559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstrProf] Add frontend temporal profiling flag (PR #122385)

2025-01-09 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg created https://github.com/llvm/llvm-project/pull/122385 As discussed in https://github.com/llvm/llvm-project/pull/121514 add the frontent flag `-fprofile-generate-temporal-instrumentation` to enable temporal profiling (https://discourse.llvm.org/t/rfc-temporal-prof

[clang] Deprecate order file instrumentation (PR #121514)

2025-01-09 Thread Ellis Hoag via cfe-commits
@@ -8010,15 +8010,19 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } } - if (Args.hasArg(options::OPT_forder_file_instrumentation)) { - CmdArgs.push_back("-forder-file-instrumentation"); - // Enable order file instrumentation when ThinLTO is

[clang] [InstrProf] Add frontend temporal profiling flag (PR #122385)

2025-01-09 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg updated https://github.com/llvm/llvm-project/pull/122385 >From 28e1eb2d0383bf417f8f769f6964eacb02a45477 Mon Sep 17 00:00:00 2001 From: Ellis Hoag Date: Thu, 9 Jan 2025 14:51:13 -0800 Subject: [PATCH 1/2] [InstrProf] Add frontent temporal profiling flag --- clang/inc

[clang] [InstrProf] Fix format issue in user manual (PR #122559)

2025-01-10 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg edited https://github.com/llvm/llvm-project/pull/122559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstrProf] Fix format issue in user manual (PR #122559)

2025-01-10 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg created https://github.com/llvm/llvm-project/pull/122559 Fix a small formatting issue in the user manual. https://clang.llvm.org/docs/UsersManual.html#cmdoption-ftemporal-profile >From 051de1349338cee46e33f63af99f58d0552afb44 Mon Sep 17 00:00:00 2001 From: Ellis Hoag

  1   2   >