@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-Name.appen
@@ -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
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
@@ -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
@@ -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
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
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
@@ -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
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
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
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
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
@@ -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);
-
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-Name.appen
@@ -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
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-Name.appen
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-Name.appen
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-Name.appen
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-Name.appen
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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_
@@ -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@
@@ -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_
@@ -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
@@ -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
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
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
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
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
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
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.
@@ -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
@@ -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
@@ -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
@@ -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));
--
@@ -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
@@ -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",
@@ -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
@@ -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-
@@ -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
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
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
@@ -1127,6 +1134,11 @@
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
if (EnableSyntheticCounts && !PGOOpt)
MPM.addPass(SyntheticCountsPropagation());
+ if (EnableMarkColdFunctions && PGOOpt &&
+ (PGOOpt->Action == PGOOptions::SampleUse ||
@@ -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
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
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
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
@@ -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);
-
@@ -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);
-
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
@@ -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
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
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
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
@@ -839,17 +839,15 @@ static bool checkHeaderSearchOptions(const
HeaderSearchOptions &HSOpts,
DiagnosticsEngine *Diags,
const LangOptions &LangOpts,
const Preprocesso
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
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
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
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
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
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
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
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
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
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
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
_
@@ -1119,6 +1125,18 @@
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
// removed.
MPM.addPass(
PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */));
+
+if (InstrumentSampleColdFuncPath.getNumOccurrences() &&
+
@@ -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
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@
@@ -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
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
@@ -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
@@ -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
@@ -1119,6 +1125,18 @@
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
// removed.
MPM.addPass(
PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */));
+
+if (InstrumentSampleColdFuncPath.getNumOccurrences() &&
+
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
@@ -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
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
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
@@ -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
@@ -1119,6 +1125,18 @@
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
// removed.
MPM.addPass(
PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */));
+
+if (InstrumentSampleColdFuncPath.getNumOccurrences() &&
+
@@ -1119,6 +1125,18 @@
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
// removed.
MPM.addPass(
PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */));
+
+if (InstrumentSampleColdFuncPath.getNumOccurrences() &&
+
@@ -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
@@ -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
@@ -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::
@@ -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
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
@@ -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
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
@@ -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
@@ -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
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
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
@@ -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
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
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
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 - 100 of 124 matches
Mail list logo