https://github.com/david-xl updated
https://github.com/llvm/llvm-project/pull/71730
>From 6032b965f85482b39e841bd95842f4e17c92fefd Mon Sep 17 00:00:00 2001
From: David Li
Date: Tue, 7 Nov 2023 23:29:44 -0800
Subject: [PATCH 1/6] Enable Custom Lowering for fabs.v8f16 on AVX
---
llvm/lib/Target
david-xl wrote:
> > David says the itanium remapper file was only used once during gcc to llvm
> > transition, so not relevant here.
>
> I believe it was actually for the libstdc++ to libc++ transition (see
> https://reviews.llvm.org/D51247 and https://reviews.llvm.org/D51240).
>
> If it is b
david-xl wrote:
> > > > David says the itanium remapper file was only used once during gcc to
> > > > llvm transition, so not relevant here.
> > >
> > >
> > > I believe it was actually for the libstdc++ to libc++ transition (see
> > > https://reviews.llvm.org/D51247 and https://reviews.llvm.o
david-xl wrote:
> > > > > > David says the itanium remapper file was only used once during gcc
> > > > > > to llvm transition, so not relevant here.
> > > > >
> > > > >
> > > > > I believe it was actually for the libstdc++ to libc++ transition (see
> > > > > https://reviews.llvm.org/D51247 an
david-xl wrote:
> > > . For IR PGO, there is basically no need to do so as the instrumentation
> > > and profile-use should be in-sync. For front-end instrumentation, there
> > > seem to be some use cases to use out of sync profile:
> > > https://reviews.llvm.org/D51240.
> >
> >
> > Thanks f
david-xl wrote:
> @david-xl , Zequan posted an
> [RFC](https://discourse.llvm.org/t/rfc-add-binary-profile-correlation-to-not-load-profile-metadata-sections-into-memory-at-runtime/74565/8)
> for this. Is there a PGO tag, or something we can use to increase visibility
> for PGO reviewers? I thi
https://github.com/david-xl approved this pull request.
Please also update the comment about tail call and symmetric transfer.
https://github.com/llvm/llvm-project/pull/71262
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
david-xl wrote:
> And digging even deeper:
>
> * FWIW I noticed that I only used `clang -c` as benchmark previously, should
> have used `clang -c -O3` resulting in this:
>
> ```
> Old-BFI: insn: 37,821,687,947 (baseline)
> New-BFI: insn: 38,133,312,923 +0.82%
> Old-BFI, no-
david-xl wrote:
> And digging even deeper:
>
> * FWIW I noticed that I only used `clang -c` as benchmark previously, should
> have used `clang -c -O3` resulting in this:
>
> ```
> Old-BFI: insn: 37,821,687,947 (baseline)
> New-BFI: insn: 38,133,312,923 +0.82%
> Old-BFI, no-
https://github.com/david-xl approved this pull request.
https://github.com/llvm/llvm-project/pull/69513
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/david-xl edited
https://github.com/llvm/llvm-project/pull/69513
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -314,7 +314,22 @@ static void loadInput(const WeightedFile &Input,
SymbolRemapper *Remapper,
}
auto FS = vfs::getRealFileSystem();
- auto ReaderOrErr = InstrProfReader::create(Input.Filename, *FS, Correlator);
+ // TODO: This only saves the first non-fatal error from
david-xl wrote:
@MatzeB ,Our internal release testing have seen lots of very large regressions
for tests without PGO or with XFDO only. While I agree this patch is the right
way to go and the good performance (without PGO) with oldBFI is somewhat by
chance, it is still better not to regress th
david-xl wrote:
I asked for those data points and share it when ready.
https://github.com/llvm/llvm-project/pull/66285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm
-o - %s | FileCheck %s
+// RUN: %clang_cc1 -mllvm -profile-correlate=binary -fprofile-instrument=clang
-fcoverage-mapping -emit-llvm -o - %s | FileCheck %s
--check-prefix=BIN-CORRELATE
https://github.com/david-xl approved this pull request.
LGTM. Thanks for the new feature. (Wait a few days in case other reviewers have
additional comments).
https://github.com/llvm/llvm-project/pull/69493
___
cfe-commits mailing list
cfe-commits@list
@@ -1829,6 +1833,22 @@ void CoverageMappingModuleGen::emit() {
llvm::GlobalValue::InternalLinkage, NamesArrVal,
llvm::getCoverageUnusedNamesVarName());
}
+ const StringRef VarName(INSTR_PROF_QUOTE(INSTR_PROF_RAW_VERSI
https://github.com/david-xl edited
https://github.com/llvm/llvm-project/pull/69493
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1829,6 +1833,22 @@ void CoverageMappingModuleGen::emit() {
llvm::GlobalValue::InternalLinkage, NamesArrVal,
llvm::getCoverageUnusedNamesVarName());
}
+ const StringRef VarName(INSTR_PROF_QUOTE(INSTR_PROF_RAW_VERSI
https://github.com/david-xl approved this pull request.
After this patch, follow up with a patch documenting raw and index format.
This has long being requested by many in the community.
https://github.com/llvm/llvm-project/pull/66825
___
cfe-commits
@@ -0,0 +1,35 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 4
+;RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
--check-prefixes=X64
+
+define i64 @sub8(i64 noundef %res, ptr %byte) {
david-xl
@@ -0,0 +1,35 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 4
+;RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
--check-prefixes=X64
+
+define i64 @sub8(i64 noundef %res, ptr %byte) {
+; X64-LABEL: sub8:
+; X6
@@ -561,6 +561,16 @@ def MOV64rm : RI<0x8B, MRMSrcMem, (outs GR64:$dst), (ins
i64mem:$src),
[(set GR64:$dst, (load addr:$src))]>;
}
+def : Pat<(or (and GR64:$dst, -256),
david-xl wrote:
32bit move has implicit zero extension, so won't be ap
@@ -561,6 +561,16 @@ def MOV64rm : RI<0x8B, MRMSrcMem, (outs GR64:$dst), (ins
i64mem:$src),
[(set GR64:$dst, (load addr:$src))]>;
}
+def : Pat<(or (and GR64:$dst, -256),
david-xl wrote:
Sorry I misunderstood. Fixed now.
Also updated the te
@@ -0,0 +1,34 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 4
+;RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
--check-prefixes=X64
david-xl wrote:
Done.
x64 is used elsewhere too. Anyway ch
@@ -0,0 +1,34 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 4
+;RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
--check-prefixes=X64
+
+define i64 @sub8(i64 noundef %res, ptr %byte) {
+; X64-LABEL: sub8:
+; X64
@@ -1515,6 +1515,15 @@ def : Pat<(X86add_flag_nocf GR32:$src1, 128),
def : Pat<(X86add_flag_nocf GR64:$src1, 128),
(SUB64ri32 GR64:$src1, -128)>;
+// Depositing value to 8/16 bit subreg:
+def : Pat<(or (and GR64:$dst, -256),
+ (i64 (zextloadi8 addr:$src
@@ -7254,6 +7255,10 @@ static SDValue
lowerBuildVectorAsBroadcast(BuildVectorSDNode *BVOp,
EVT CVT = Ld.getValueType();
assert(!CVT.isVector() && "Must not broadcast a vector type");
+// 512 bit vpbroadcastw is only available with AVX512BW
+if (ScalarSize == 1
@@ -7254,6 +7255,10 @@ static SDValue
lowerBuildVectorAsBroadcast(BuildVectorSDNode *BVOp,
EVT CVT = Ld.getValueType();
assert(!CVT.isVector() && "Must not broadcast a vector type");
+// 512 bit vpbroadcastw is only available with AVX512BW
+if (ScalarSize == 1
@@ -986,15 +1003,15 @@ void X86DAGToDAGISel::PreprocessISelDAG() {
case X86ISD::VBROADCAST: {
MVT VT = N->getSimpleValueType(0);
// Emulate v32i16/v64i8 broadcast without BWI.
- if (!Subtarget->hasBWI() && (VT == MVT::v32i16 || VT == MVT::v64i8)) {
-
david-xl wrote:
Gentle ping.
https://github.com/llvm/llvm-project/pull/73186
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/david-xl created
https://github.com/llvm/llvm-project/pull/73845
Update the user manual to provide guidance on the usage for different flavors
of instrumentations.
>From b2c9081a0c3d5a982c2a23857bf986ec80c83cb5 Mon Sep 17 00:00:00 2001
From: David Li
Date: Mon, 27 Nov 2023
https://github.com/david-xl updated
https://github.com/llvm/llvm-project/pull/73845
>From b2c9081a0c3d5a982c2a23857bf986ec80c83cb5 Mon Sep 17 00:00:00 2001
From: David Li
Date: Mon, 27 Nov 2023 13:49:25 -0800
Subject: [PATCH 1/2] Fix stale comment
---
llvm/lib/Transforms/Instrumentation/Instr
https://github.com/david-xl updated
https://github.com/llvm/llvm-project/pull/73845
>From 627d664f0281d6db778f5d624710a7066e6c362f Mon Sep 17 00:00:00 2001
From: David Li
Date: Wed, 29 Nov 2023 11:56:31 -0800
Subject: [PATCH] Fix PGO documentation in user manual
---
clang/docs/UsersManual.rst
https://github.com/david-xl updated
https://github.com/llvm/llvm-project/pull/73845
>From ce4c93c2b250e2f4b6703f6321397dd774333f35 Mon Sep 17 00:00:00 2001
From: David Li
Date: Wed, 29 Nov 2023 11:56:31 -0800
Subject: [PATCH] Fix PGO documentation in user manual
---
clang/docs/UsersManual.rst
@@ -4401,13 +4413,18 @@ Execute ``clang-cl /?`` to see a list of supported
options:
Instrument only functions from files where names
don't match all the regexes separated by a semi-colon
-fprofile-filter-files=
@@ -4401,13 +4413,18 @@ Execute ``clang-cl /?`` to see a list of supported
options:
Instrument only functions from files where names
don't match all the regexes separated by a semi-colon
-fprofile-filter-files=
@@ -4401,13 +4413,18 @@ Execute ``clang-cl /?`` to see a list of supported
options:
Instrument only functions from files where names
don't match all the regexes separated by a semi-colon
-fprofile-filter-files=
https://github.com/david-xl updated
https://github.com/llvm/llvm-project/pull/73845
>From 7f64cc07b2883b9fde672510a3b7c1b71cfb4dfd Mon Sep 17 00:00:00 2001
From: David Li
Date: Wed, 29 Nov 2023 11:56:31 -0800
Subject: [PATCH] Fix PGO documentation in user manual
---
clang/docs/UsersManual.rst
https://github.com/david-xl updated
https://github.com/llvm/llvm-project/pull/73845
>From 15dd2029a68a6fdbbc4eee5764ce966e0533880f Mon Sep 17 00:00:00 2001
From: David Li
Date: Wed, 29 Nov 2023 11:56:31 -0800
Subject: [PATCH] Fix PGO documentation in user manual
---
clang/docs/UsersManual.rst
https://github.com/david-xl updated
https://github.com/llvm/llvm-project/pull/73845
>From 4cf62b1b780edef9902b5ec50b56d676810c3922 Mon Sep 17 00:00:00 2001
From: David Li
Date: Wed, 29 Nov 2023 11:56:31 -0800
Subject: [PATCH] Fix PGO documentation in user manual
---
clang/docs/UsersManual.rst
https://github.com/david-xl updated
https://github.com/llvm/llvm-project/pull/73845
>From 29b5b28f52c88ebd862163c4feb1573460c5c79e Mon Sep 17 00:00:00 2001
From: David Li
Date: Wed, 29 Nov 2023 11:56:31 -0800
Subject: [PATCH] Fix PGO documentation in user manual
---
clang/docs/UsersManual.rst
@@ -4401,13 +4415,21 @@ Execute ``clang-cl /?`` to see a list of supported
options:
Instrument only functions from files where names
don't match all the regexes separated by a semi-colon
-fprofile-filter-files=
@@ -4401,13 +4415,21 @@ Execute ``clang-cl /?`` to see a list of supported
options:
Instrument only functions from files where names
don't match all the regexes separated by a semi-colon
-fprofile-filter-files=
@@ -4401,13 +4413,18 @@ Execute ``clang-cl /?`` to see a list of supported
options:
Instrument only functions from files where names
don't match all the regexes separated by a semi-colon
-fprofile-filter-files=
https://github.com/david-xl updated
https://github.com/llvm/llvm-project/pull/73845
>From 4c0f907dc778e8cfd0e41008b8b2970a016201b0 Mon Sep 17 00:00:00 2001
From: David Li
Date: Wed, 29 Nov 2023 11:56:31 -0800
Subject: [PATCH] Fix PGO documentation in user manual
---
clang/docs/UsersManual.rst
https://github.com/david-xl closed
https://github.com/llvm/llvm-project/pull/73845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,93 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 4
+; RUN: llc < %s -mtriple=i386-unknown-unknown | FileCheck %s
--check-prefixes=I386
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
--check-pref
https://github.com/david-xl approved this pull request.
https://github.com/llvm/llvm-project/pull/75080
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/david-xl commented:
Why is a new user facing option needed? I suppose this can be done under
-fdebug-info-for-profiling. An internal option can also be added to disable it.
https://github.com/llvm/llvm-project/pull/81545
___
cfe-com
david-xl wrote:
> So the additional debug info for pointer type should be generated when
> -fdebug-info-for-profiling is enabled?
yes, it is extra debug info for profiling (can be used for samplePGO).
https://github.com/llvm/llvm-project/pull/81545
_
david-xl wrote:
> > Good example. This pass should be run post-inline. @aeubanks, any reason we
> > want to run it early in the pipeline?
>
> We want the main function simplification pipeline to see these function
> attributes because some optimizations trigger or don't trigger depending on
>
https://github.com/david-xl approved this pull request.
https://github.com/llvm/llvm-project/pull/69030
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/david-xl commented:
Please add test cases. The clang user manual also needs update.
https://github.com/llvm/llvm-project/pull/81545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
@@ -0,0 +1,73 @@
+//===--===//
+//
+// 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: Apac
@@ -0,0 +1,73 @@
+//===--===//
+//
+// 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: Apac
david-xl wrote:
> How does this relate to the existing `shouldOptimizeForSize(Function&, ...)`
> and `shouldOptimizeForSize(MachineFunction&, ...)` APIs which appear to
> provide similar functionality at a first glance. If they are the same, then
> we should have a plan in place to cleanup and
https://github.com/david-xl edited
https://github.com/llvm/llvm-project/pull/76868
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/david-xl commented:
Can you increase the test coverage:
1) preserve_none caller TAIL-calls preserve_none callee -- the tail call is
preserved
2) regular function TAIL-calls preserve_none callee -- the tail call should be
disabled and all CSRs should be saved/restored around
@@ -0,0 +1,85 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck
--check-prefixes=ALL %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck
--check-prefixes=ALL,AVX %s
+
+; Don't need to preserve registers before using them.
+de
@@ -416,6 +416,13 @@ added in the future:
This calling convention, like the `PreserveMost` calling convention, will
be
used by a future version of the ObjectiveC runtime and should be considered
experimental at this time.
+"``preserve_nonecc``" - The `PreserveNone`
@@ -0,0 +1,85 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck
--check-prefixes=ALL %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck
--check-prefixes=ALL,AVX %s
+
+; Don't need to preserve registers before using them.
+de
@@ -0,0 +1,131 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 4
+; RUN: llc -mtriple=x86_64-unknown-unknown -mcpu=corei7 < %s | FileCheck %s
+
+; This test checks various function call behaviors between preserve_none and
+; n
@@ -0,0 +1,131 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
UTC_ARGS: --version 4
+; RUN: llc -mtriple=x86_64-unknown-unknown -mcpu=corei7 < %s | FileCheck %s
+
+; This test checks various function call behaviors between preserve_none and
+; n
https://github.com/david-xl approved this pull request.
https://github.com/llvm/llvm-project/pull/76868
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
david-xl wrote:
> > I don't understand, if you're saying the profile is accurate, then those
> > functions are actually cold, so we should be able to mark them as optsize?
>
> Accurate is not black or white. The current heuristic requires certain level
> of accuracy to be effective. If you mak
david-xl wrote:
> > > > I don't understand, if you're saying the profile is accurate, then
> > > > those functions are actually cold, so we should be able to mark them as
> > > > optsize?
> > >
> > >
> > > Accurate is not black or white. The current heuristic requires certain
> > > level of
david-xl wrote:
Can you send a RFC for this enhancement ? The first 2 paragraph of this PR can
be expanded a little more to show motivations (RAM saving, or raw profile size
saving and why) and the savings data.
https://github.com/llvm/llvm-project/pull/69493
__
@@ -98,13 +99,16 @@ extern cl::opt PrintPipelinePasses;
static cl::opt ClSanitizeOnOptimizerEarlyEP(
"sanitizer-early-opt-ep", cl::Optional,
cl::desc("Insert sanitizers on OptimizerEarlyEP."), cl::init(false));
-}
+
+extern cl::opt ProfileCorrelate;
dav
@@ -374,6 +376,14 @@ class RawInstrProfReader : public InstrProfReader {
return (Version & VARIANT_MASK_DBG_CORRELATE) != 0;
}
+ bool useBinaryCorrelate() const override {
+return (Version & VARIANT_MASK_BIN_CORRELATE) != 0;
+ }
+
+ bool useCorrelate() const {
---
@@ -66,8 +66,9 @@ int __llvm_profile_check_compatibility(const char
*ProfileData,
Header->NumCounters !=
__llvm_profile_get_num_counters(__llvm_profile_begin_counters(),
__llvm_profile_end_counters()) ||
- Header->
@@ -267,6 +267,9 @@ uint64_t __llvm_profile_get_num_data(const
__llvm_profile_data *Begin,
uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin,
const __llvm_profile_data *End);
+/*! \brief Get the size of the profile na
@@ -61,9 +64,20 @@ uint64_t __llvm_profile_get_num_data(const
__llvm_profile_data *Begin,
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin,
const __llvm_profile_data *End) {
+ if ((__llvm_profi
@@ -259,19 +259,19 @@ lprofWriteDataImpl(ProfDataWriter *Writer, const
__llvm_profile_data *DataBegin,
const char *CountersBegin, const char *CountersEnd,
VPDataReaderType *VPDataReader, const char *NamesBegin,
const cha
@@ -61,9 +64,20 @@ uint64_t __llvm_profile_get_num_data(const
__llvm_profile_data *Begin,
COMPILER_RT_VISIBILITY
uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin,
const __llvm_profile_data *End) {
+ if ((__llvm_profi
@@ -540,10 +540,10 @@ Error RawInstrProfReader::readHeader(
"\nPLEASE update this tool to version in the raw profile, or
"
"regenerate raw profile with expected version.")
.str());
- if (useDebugInfoCorrelate() && !Corr
@@ -98,13 +99,16 @@ extern cl::opt PrintPipelinePasses;
static cl::opt ClSanitizeOnOptimizerEarlyEP(
"sanitizer-early-opt-ep", cl::Optional,
cl::desc("Insert sanitizers on OptimizerEarlyEP."), cl::init(false));
-}
+
+extern cl::opt ProfileCorrelate;
dav
https://github.com/david-xl 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
@@ -0,0 +1,65 @@
+//===--===//
+//
+// 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: Apac
david-xl wrote:
> > This should works with PGO when value profiling is disabled
>
> Is this not compatible with value profiling? or just not implemented yet?
Not compatible, but this feature is mainly for coverage testing.
https://github.com/llvm/llvm-project/pull/69493
___
@@ -12,27 +12,96 @@
#ifndef LLVM_ANALYSIS_INDIRECTCALLVISITOR_H
#define LLVM_ANALYSIS_INDIRECTCALLVISITOR_H
+#include "llvm/ADT/SetVector.h"
#include "llvm/IR/InstVisitor.h"
#include
namespace llvm {
-// Visitor class that finds all indirect call.
+// Visitor class that
@@ -12,27 +12,96 @@
#ifndef LLVM_ANALYSIS_INDIRECTCALLVISITOR_H
#define LLVM_ANALYSIS_INDIRECTCALLVISITOR_H
+#include "llvm/ADT/SetVector.h"
#include "llvm/IR/InstVisitor.h"
#include
namespace llvm {
-// Visitor class that finds all indirect call.
+// Visitor class that
@@ -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
david-xl wrote:
This is concerning. Can this be reverted for now and we can help with some
internal performance testing. @xur-llvm
https://github.com/llvm/llvm-project/pull/66285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.l
@@ -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
david-xl wrote:
Yes -- the revert can wait until more data is available. I agree that it should
help performance in theory.
https://github.com/llvm/llvm-project/pull/66285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
david-xl wrote:
Yes -- the revert can wait until more data is available. I agree that it should
help performance in theory.
https://github.com/llvm/llvm-project/pull/66285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
david-xl wrote:
The old code of not marking them as cold works also just by accident though.
https://github.com/llvm/llvm-project/pull/66285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
david-xl wrote:
Agree that deciding coldness based on local entry frequency (2%) is a bad idea
though.
https://github.com/llvm/llvm-project/pull/66285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
david-xl wrote:
Agree that deciding coldness based on local entry frequency (2%) is a bad idea
though.
https://github.com/llvm/llvm-project/pull/66285
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
david-xl wrote:
Contracting my past self (one of the reviewers of the patch), I think coldness
check should be based on a global threshold, which exists when synthetic entry
count propagation is enabled (without PGO).
https://github.com/llvm/llvm-project/pull/66285
@@ -276,6 +286,12 @@ uint64_t __llvm_profile_get_num_counters(const char
*Begin, const char *End);
/*! \brief Get the size of the profile counters section in bytes. */
uint64_t __llvm_profile_get_counters_size(const char *Begin, const char *End);
+uint64_t __llvm_profile_get_
@@ -0,0 +1,139 @@
+; RUN: opt < %s -passes=pgo-instr-gen -S | FileCheck %s --check-prefix=GEN
+; RUN: opt < %s -passes=pgo-instr-gen,instrprof -S | FileCheck %s
--check-prefix=LOWER
+
+target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
+
@@ -276,6 +286,12 @@ uint64_t __llvm_profile_get_num_counters(const char
*Begin, const char *End);
/*! \brief Get the size of the profile counters section in bytes. */
uint64_t __llvm_profile_get_counters_size(const char *Begin, const char *End);
+uint64_t __llvm_profile_get_
@@ -276,6 +286,12 @@ uint64_t __llvm_profile_get_num_counters(const char
*Begin, const char *End);
/*! \brief Get the size of the profile counters section in bytes. */
uint64_t __llvm_profile_get_counters_size(const char *Begin, const char *End);
+uint64_t __llvm_profile_get_
david-xl wrote:
> The work sounds interesting. Can you provide a bit more context about it?
> Will it be used to improve ICP when it's sufficient to just compare the
> vtable address instead of the vfunc address?
yes -- it can not only eliminate vtable load, but also enable target check
combi
@@ -537,6 +538,9 @@ class SampleContext {
assert(!Name.empty() && "Name is empty");
}
+ SampleContext(ProfileFuncRef Name)
david-xl wrote:
Name ->Func
https://github.com/llvm/llvm-project/pull/66164
@@ -476,12 +471,12 @@ enum ContextAttributeMask {
// Represents a context frame with function name and line location
struct SampleContextFrame {
- StringRef FuncName;
+ ProfileFuncRef FuncName;
david-xl wrote:
Nit: FuncName--> Func
https://github.com/llvm
@@ -1135,12 +1141,12 @@ class FunctionSamples {
/// translate \p Name in current FunctionSamples into its original name
/// by looking up in the function map GUIDToFuncNameMap.
/// If the original name doesn't exist in the map, return empty StringRef.
- StringRef getFunc
@@ -715,7 +717,7 @@ class SampleContext {
private:
/// Mangled name of the function.
- StringRef Name;
+ ProfileFuncRef Name;
david-xl wrote:
Name --> Func
https://github.com/llvm/llvm-project/pull/66164
___
cf
1 - 100 of 368 matches
Mail list logo