https://github.com/ellishg approved this pull request.
https://github.com/llvm/llvm-project/pull/136333
___
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/130192
___
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/130192
>From 72109c24229ce3a1deda9f8303e6e75677cd0ce4 Mon Sep 17 00:00:00 2001
From: Ellis Hoag
Date: Thu, 6 Mar 2025 14:17:51 -0800
Subject: [PATCH 1/2] [InstrProf] Remove -forder-file-instrumentation
---
clang/docs
https://github.com/ellishg created
https://github.com/llvm/llvm-project/pull/130192
Completely remove `-forder-file-instrumentation`. This was deprecated in
https://github.com/llvm/llvm-project/pull/121514 and removal was planned in
https://discourse.llvm.org/t/deprecate-forder-file-instrument
@@ -1334,7 +1334,10 @@ runThinLTOBackend(CompilerInstance &CI,
ModuleSummaryIndex *CombinedIndex,
// Context sensitive profile.
if (CGOpts.hasProfileCSIRInstr()) {
Conf.RunCSIRInstr = true;
-Conf.CSIRProfile = std::move(CGOpts.InstrProfileOutput);
+Conf.CSIRPro
https://github.com/ellishg updated
https://github.com/llvm/llvm-project/pull/128920
>From 2e1946730f7ae2473a4fc94f8918eb3d9d225d17 Mon Sep 17 00:00:00 2001
From: Ellis Hoag
Date: Wed, 26 Feb 2025 09:48:46 -0800
Subject: [PATCH 1/3] [memprof] Export __memprof_default_options_str on Darwin
---
https://github.com/ellishg updated
https://github.com/llvm/llvm-project/pull/128920
>From 2e1946730f7ae2473a4fc94f8918eb3d9d225d17 Mon Sep 17 00:00:00 2001
From: Ellis Hoag
Date: Wed, 26 Feb 2025 09:48:46 -0800
Subject: [PATCH 1/2] [memprof] Export __memprof_default_options_str on Darwin
---
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList
&Args,
}
}
+ if (Sanitize.needsMemProfRt())
+if (hasExportSymbolDirective(Args))
+ addExportedSymbol(CmdArgs, "___memprof_default_options_str");
ellishg wrote:
@tere
ellishg wrote:
Moved to https://github.com/llvm/llvm-project/pull/128920
https://github.com/llvm/llvm-project/pull/128615
___
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/128615
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList
&Args,
}
}
+ if (Sanitize.needsMemProfRt())
+if (hasExportSymbolDirective(Args))
+ addExportedSymbol(CmdArgs, "___memprof_default_options_str");
ellishg wrote:
Yes,
@@ -17,3 +17,11 @@
// RUN: not %clangxx --target=x86_64-linux-gnu -fprofile-generate
-fmemory-profile-use=foo %s -### 2>&1 | FileCheck %s
--check-prefix=CONFLICTWITHPGOINSTR
// CONFLICTWITHPGOINSTR: error: invalid argument '-fmemory-profile-use=foo'
not allowed with '-fprof
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList
&Args,
}
}
+ if (Sanitize.needsMemProfRt())
+if (hasExportSymbolDirective(Args))
+ addExportedSymbol(CmdArgs, "___memprof_default_options_str");
ellishg wrote:
@tere
https://github.com/ellishg created
https://github.com/llvm/llvm-project/pull/128920
The `-memprof-runtime-default-options` LLVM flag introduced in
https://github.com/llvm/llvm-project/pull/118874 creates the
`__memprof_default_options_str` symbol with `WeakAnyLinkage` on Darwin.
https://githu
ellishg wrote:
> Not opposed to adding this as a clang driver flag especially if it is needed
> for something other than testing/debugging, however, you could presumably
> always add the exported symbol when -fmemory-profiler is specified (or does
> the linker give an error if the specified sy
https://github.com/ellishg updated
https://github.com/llvm/llvm-project/pull/128615
>From fa0202169af23419c4bcbf66eabd1beb6b6e8e34 Mon Sep 17 00:00:00 2001
From: Ellis Hoag
Date: Mon, 24 Feb 2025 17:57:48 -0800
Subject: [PATCH 1/2] [memprof] Add memprof options clang frontend flag
---
clang/i
ellishg wrote:
CC @SharonXSharon
https://github.com/llvm/llvm-project/pull/128615
___
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/128615
Add the clang frontend flag `-fmemory-profile-runtime-default-options` to
support the `-memprof-runtime-default-options` LLVM flag introduced in
https://github.com/llvm/llvm-project/pull/118874.
This enables u
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/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
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 closed
https://github.com/llvm/llvm-project/pull/122385
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ellishg edited
https://github.com/llvm/llvm-project/pull/122385
___
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/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/3] [InstrProf] Add frontent temporal profiling flag
---
clang/inc
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
@@ -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 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
@@ -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/121514
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ellishg wrote:
> Is the plan to reuse the clang option -forder-file-instrumentation in the
> future?
No I wasn't planning on it. I'd like to remove this code for maintainability
reasons and to encourage others to use IRPGO instead
https://github.com/llvm/llvm-project/pull/121514
https://github.com/ellishg updated
https://github.com/llvm/llvm-project/pull/121514
>From 432c55783cbb5d4a9675f1f6018b58ffc4fe636d Mon Sep 17 00:00:00 2001
From: Ellis Hoag
Date: Thu, 2 Jan 2025 10:51:54 -0800
Subject: [PATCH 1/2] Deprecate order file instrumentation
---
clang/include/clang/D
https://github.com/ellishg edited
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
https://github.com/ellishg created
https://github.com/llvm/llvm-project/pull/121514
`-forder-file-instrumentation` is used to instrument a startup function order,
but this feature is also in IRPGO as Temporal Profiling. As discussed in
https://discourse.llvm.org/t/rfc-temporal-profiling-extens
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
@@ -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 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
@@ -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 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@
@@ -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() &&
+
@@ -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() &&
+
@@ -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
@@ -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
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
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
@@ -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:
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
@@ -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
@@ -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.
ellishg wrote:
This comment isn't very useful (thanks to the functio
@@ -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
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
_
@@ -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 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
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 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
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
@@ -839,17 +839,15 @@ static bool checkHeaderSearchOptions(const
HeaderSearchOptions &HSOpts,
DiagnosticsEngine *Diags,
const LangOptions &LangOpts,
const Preprocesso
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
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 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
@@ -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
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.
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
@@ -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);
-
@@ -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
@@ -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
@@ -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_
@@ -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
@@ -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
@@ -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
@@ -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);
-
@@ -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:
> 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
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
@@ -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
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
@@ -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
@@ -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
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 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
1 - 100 of 125 matches
Mail list logo