llvmbot wrote:
@llvm/pr-subscribers-llvm-binary-utilities
@llvm/pr-subscribers-mc
Author: Fangrui Song (MaskRay)
Changes
llvm-objcopy may modify the symbol table and need to rewrite
relocations. For CREL, while we can reuse the decoder from #91280, we
need an encoder to support CREL.
Sinc
https://github.com/MaskRay created
https://github.com/llvm/llvm-project/pull/97521
llvm-objcopy may modify the symbol table and need to rewrite
relocations. For CREL, while we can reuse the decoder from #91280, we
need an encoder to support CREL.
Since MC/ELFObjectWriter.cpp has an existing enc
@@ -0,0 +1,213 @@
+# RUN: yaml2obj --docnum=1 %s -o %t
+# RUN: llvm-objdump -r %t | FileCheck %s --strict-whitespace --match-full-lines
+
+# CHECK:RELOCATION RECORDS FOR [.text]:
+# CHECK-NEXT:OFFSET TYPE VALUE
+# CHECK-NEXT:0001 R_X8
@@ -1453,6 +1525,15 @@ template bool
ELFObjectFile::isRelocatableObject() const {
return EF.getHeader().e_type == ELF::ET_REL;
}
+template
+StringRef ELFObjectFile::getCrelError(DataRefImpl Sec) const {
+ uintptr_t SHT = reinterpret_cast(cantFail(EF.sections()).begin());
https://github.com/MaskRay edited
https://github.com/llvm/llvm-project/pull/97382
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/MaskRay updated
https://github.com/llvm/llvm-project/pull/97382
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/MaskRay updated
https://github.com/llvm/llvm-project/pull/97382
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -70,12 +70,16 @@ class YAMLProfileReader : public ProfileReaderBase {
std::vector ProfileBFs;
/// Populate \p Function profile with the one supplied in YAML format.
- bool parseFunctionProfile(BinaryFunction &Function,
-const yaml::bolt::Bin
@@ -479,6 +481,11 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
NormalizeByInsnCount = usesEvent("cycles") || usesEvent("instructions");
NormalizeByCalls = usesEvent("branches");
+ // Map profiled function ids to names.
+ DenseMap IdToFunctionName;
---
@@ -2687,6 +2687,15 @@ void Dumper::printRelocations() {
<< "VALUE\n";
for (SectionRef Section : P.second) {
+ // CREL requires decoding and has its specific errors.
+ if (O.isELF() && ELFSectionRef(Section).getType() == ELF::SHT_CREL) {
+const
@@ -342,6 +350,107 @@ bool YAMLProfileReader::mayHaveProfileData(const
BinaryFunction &BF) {
return false;
}
+uint64_t YAMLProfileReader::matchWithNameSimilarity(BinaryContext &BC) {
+ uint64_t MatchedWithNameSimilarity = 0;
+ ItaniumPartialDemangler ItaniumPartialDemangl
https://github.com/aaupov commented:
LG in general with some comments
https://github.com/llvm/llvm-project/pull/95884
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-co
@@ -342,6 +350,107 @@ bool YAMLProfileReader::mayHaveProfileData(const
BinaryFunction &BF) {
return false;
}
+uint64_t YAMLProfileReader::matchWithNameSimilarity(BinaryContext &BC) {
+ uint64_t MatchedWithNameSimilarity = 0;
+ ItaniumPartialDemangler ItaniumPartialDemangl
@@ -342,6 +350,107 @@ bool YAMLProfileReader::mayHaveProfileData(const
BinaryFunction &BF) {
return false;
}
+uint64_t YAMLProfileReader::matchWithNameSimilarity(BinaryContext &BC) {
+ uint64_t MatchedWithNameSimilarity = 0;
+ ItaniumPartialDemangler ItaniumPartialDemangl
@@ -342,6 +350,107 @@ bool YAMLProfileReader::mayHaveProfileData(const
BinaryFunction &BF) {
return false;
}
+uint64_t YAMLProfileReader::matchWithNameSimilarity(BinaryContext &BC) {
+ uint64_t MatchedWithNameSimilarity = 0;
+ ItaniumPartialDemangler ItaniumPartialDemangl
@@ -342,6 +350,107 @@ bool YAMLProfileReader::mayHaveProfileData(const
BinaryFunction &BF) {
return false;
}
+uint64_t YAMLProfileReader::matchWithNameSimilarity(BinaryContext &BC) {
+ uint64_t MatchedWithNameSimilarity = 0;
+ ItaniumPartialDemangler ItaniumPartialDemangl
@@ -23,6 +26,11 @@ extern cl::opt Verbosity;
extern cl::OptionCategory BoltOptCategory;
extern cl::opt InferStaleProfile;
+cl::opt NameSimilarityFunctionMatchingThreshold(
+"name-similarity-function-matching-threshold",
+cl::desc("Match functions using namespace and ed
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/95884
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
shawbyoung wrote:
cc @WenleiHe @wlei-llvm
https://github.com/llvm/llvm-project/pull/96596
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/shawbyoung created
https://github.com/llvm/llvm-project/pull/97502
Moved function matching techniques into separate helper functions.
Test Plan: n/a
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/96596
>From 05d59574d6260b98a469921eb2fccf5398bfafb6 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 24 Jun 2024 23:00:59 -0700
Subject: [PATCH 01/13] Added call to matchWithCallsAsAnchors
Created using spr 1.
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/96596
>From 05d59574d6260b98a469921eb2fccf5398bfafb6 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 24 Jun 2024 23:00:59 -0700
Subject: [PATCH 01/12] Added call to matchWithCallsAsAnchors
Created using spr 1.
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/96596
>From 05d59574d6260b98a469921eb2fccf5398bfafb6 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 24 Jun 2024 23:00:59 -0700
Subject: [PATCH 01/11] Added call to matchWithCallsAsAnchors
Created using spr 1.
llvmbot wrote:
@llvm/pr-subscribers-backend-aarch64
Author: Anatoly Trosinenko (atrosinenko)
Changes
In preparation for implementing hardening of BLRA* instructions, restrict thunk
function generation to only the thunks being actually called from any function.
As described in the existin
https://github.com/atrosinenko created
https://github.com/llvm/llvm-project/pull/97472
In preparation for implementing hardening of BLRA* instructions, restrict thunk
function generation to only the thunks being actually called from any function.
As described in the existing comments, emitting
@@ -216,31 +215,50 @@ bool
ClauseProcessor::processMotionClauses(lower::StatementContext &stmtCtx,
if (origSymbol && fir::isTypeWithDescriptor(origSymbol.getType()))
symAddr = origSymbol;
+ if (object.sym()->owner().IsDerivedType()) {
+
Author: Mehdi Amini
Date: 2024-07-02T20:56:56+02:00
New Revision: 6d4ac22a2a982473a37fbca529296db5a8b5efc2
URL:
https://github.com/llvm/llvm-project/commit/6d4ac22a2a982473a37fbca529296db5a8b5efc2
DIFF:
https://github.com/llvm/llvm-project/commit/6d4ac22a2a982473a37fbca529296db5a8b5efc2.diff
L
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/96596
>From 05d59574d6260b98a469921eb2fccf5398bfafb6 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 24 Jun 2024 23:00:59 -0700
Subject: [PATCH 01/10] Added call to matchWithCallsAsAnchors
Created using spr 1.
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/96596
>From 05d59574d6260b98a469921eb2fccf5398bfafb6 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 24 Jun 2024 23:00:59 -0700
Subject: [PATCH 1/9] Added call to matchWithCallsAsAnchors
Created using spr 1.3.
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/96596
>From 05d59574d6260b98a469921eb2fccf5398bfafb6 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 24 Jun 2024 23:00:59 -0700
Subject: [PATCH 1/9] Added call to matchWithCallsAsAnchors
Created using spr 1.3.
AaronBallman wrote:
> Thanks.
>
> > ... how this impacts build times for Clang itself? I'm assuming that if
> > ASTMatchers.h isn't modified, CMake won't re-run
> > generate_ast_matcher_doc_tests.py and so the compile time performance hit
> > is only on full rebuilds or when changing the head
@@ -216,31 +215,50 @@ bool
ClauseProcessor::processMotionClauses(lower::StatementContext &stmtCtx,
if (origSymbol && fir::isTypeWithDescriptor(origSymbol.getType()))
symAddr = origSymbol;
+ if (object.sym()->owner().IsDerivedType()) {
+
https://github.com/arsenm updated
https://github.com/llvm/llvm-project/pull/97050
>From 5fe43ecedbf2411d4ba6ff251a8a33d72900f264 Mon Sep 17 00:00:00 2001
From: Matt Arsenault
Date: Thu, 27 Jun 2024 16:32:48 +0200
Subject: [PATCH] AMDGPU: Remove flat/global atomic fadd v2bf16 intrinsics
These a
https://github.com/arsenm updated
https://github.com/llvm/llvm-project/pull/96876
>From 953322d39c5e049ba3305457942bcdf2524ad819 Mon Sep 17 00:00:00 2001
From: Matt Arsenault
Date: Wed, 26 Jun 2024 23:18:32 +0200
Subject: [PATCH] clang/AMDGPU: Emit atomicrmw for flat/global atomic min/max
f64
https://github.com/arsenm updated
https://github.com/llvm/llvm-project/pull/96875
>From e7a4d008fc1f0473a61fa77082374d968a5aec55 Mon Sep 17 00:00:00 2001
From: Matt Arsenault
Date: Wed, 26 Jun 2024 19:34:43 +0200
Subject: [PATCH] clang/AMDGPU: Emit atomicrmw for global/flat fadd v2bf16
builtin
https://github.com/arsenm updated
https://github.com/llvm/llvm-project/pull/96874
>From 3a0a8f445bb9cd82a4537689b47a61f4a85cd9e7 Mon Sep 17 00:00:00 2001
From: Matt Arsenault
Date: Wed, 26 Jun 2024 19:15:26 +0200
Subject: [PATCH] clang/AMDGPU: Emit atomicrmw from flat_atomic_{f32|f64}
builtins
https://github.com/arsenm updated
https://github.com/llvm/llvm-project/pull/96872
>From 3c66afc298a4dfbd4dfcb5e978c12b94f29cb458 Mon Sep 17 00:00:00 2001
From: Matt Arsenault
Date: Tue, 11 Jun 2024 10:58:44 +0200
Subject: [PATCH 1/2] clang/AMDGPU: Emit atomicrmw for
__builtin_amdgcn_global_ato
https://github.com/arsenm updated
https://github.com/llvm/llvm-project/pull/96873
>From 926b7d46672ea5bc43494909c95ea54fd33ebf18 Mon Sep 17 00:00:00 2001
From: Matt Arsenault
Date: Wed, 26 Jun 2024 19:12:59 +0200
Subject: [PATCH] clang/AMDGPU: Emit atomicrmw from
{global|flat}_atomic_fadd_v2f1
https://github.com/arsenm updated
https://github.com/llvm/llvm-project/pull/96444
>From ece323988a3a47cfa5a1332620100d77a9cbd56a Mon Sep 17 00:00:00 2001
From: Matt Arsenault
Date: Sun, 23 Jun 2024 17:07:53 +0200
Subject: [PATCH] AMDGPU: Add subtarget feature for memory atomic fadd f64
---
ll
https://github.com/arsenm updated
https://github.com/llvm/llvm-project/pull/96443
>From b5be20b30c144b22b752d438fad1e7e8c351864d Mon Sep 17 00:00:00 2001
From: Matt Arsenault
Date: Sun, 23 Jun 2024 16:44:08 +0200
Subject: [PATCH 1/3] AMDGPU: Add subtarget feature for global atomic fadd
denorma
https://github.com/shawbyoung ready_for_review
https://github.com/llvm/llvm-project/pull/96596
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/shawbyoung edited
https://github.com/llvm/llvm-project/pull/96596
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/ilovepi updated
https://github.com/llvm/llvm-project/pull/97347
>From 5c57d12517ad58310511eb27bf7cc4ec660d4fa7 Mon Sep 17 00:00:00 2001
From: Paul Kirth
Date: Tue, 2 Jul 2024 09:39:46 -0700
Subject: [PATCH] Add handling for invalid tags
Created using spr 1.3.4
---
lld/ELF/A
agozillon wrote:
Small ping for some reviewer attention please, if at all possible on this PR
stack! :-) thank you very much in advance!
https://github.com/llvm/llvm-project/pull/96266
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.ll
https://github.com/shawbyoung edited
https://github.com/llvm/llvm-project/pull/96596
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/96596
>From 05d59574d6260b98a469921eb2fccf5398bfafb6 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 24 Jun 2024 23:00:59 -0700
Subject: [PATCH 1/9] Added call to matchWithCallsAsAnchors
Created using spr 1.3.
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/96596
>From 05d59574d6260b98a469921eb2fccf5398bfafb6 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 24 Jun 2024 23:00:59 -0700
Subject: [PATCH 1/8] Added call to matchWithCallsAsAnchors
Created using spr 1.3.
aaupov wrote:
It's not. I landed to main manually.
https://github.com/llvm/llvm-project/pull/97358
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
dcci wrote:
is this the correct destination branch?
https://github.com/llvm/llvm-project/pull/97358
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/aaupov closed https://github.com/llvm/llvm-project/pull/97358
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/97358
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
dcci wrote:
Maybe you can add a comment to the title explaining *why* we're removing it.
https://github.com/llvm/llvm-project/pull/97358
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
https://github.com/dcci approved this pull request.
Thanks for measuring the impact and removing this code, Amir.
https://github.com/llvm/llvm-project/pull/97358
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm
https://github.com/ilovepi updated
https://github.com/llvm/llvm-project/pull/90267
>From 788f58b302f20a000db3a9741e54cc861c9dcb88 Mon Sep 17 00:00:00 2001
From: Paul Kirth
Date: Mon, 1 Jul 2024 10:13:23 -0700
Subject: [PATCH] Fix mismerge
Created using spr 1.3.4
---
lld/ELF/Arch/RISCV.cpp
https://github.com/ilovepi updated
https://github.com/llvm/llvm-project/pull/90267
>From 788f58b302f20a000db3a9741e54cc861c9dcb88 Mon Sep 17 00:00:00 2001
From: Paul Kirth
Date: Mon, 1 Jul 2024 10:13:23 -0700
Subject: [PATCH] Fix mismerge
Created using spr 1.3.4
---
lld/ELF/Arch/RISCV.cpp
https://github.com/ilovepi updated
https://github.com/llvm/llvm-project/pull/97347
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/ilovepi updated
https://github.com/llvm/llvm-project/pull/97347
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
vikramRH wrote:
> > > > [AMDGPU] Enable atomic optimizer for divergent i64 and double values
> > >
> > >
> > > Needs some i64 tests
> >
> >
> > added new i64 tests, however I see there currently exists an issue with DPP
> > path where dpp combine partially fuses the mov_dpp pieces causing ma
arsenm wrote:
> > > [AMDGPU] Enable atomic optimizer for divergent i64 and double values
> >
> >
> > Needs some i64 tests
>
> added new i64 tests, however I see there currently exists an issue with DPP
> path where dpp combine partially fuses the mov_dpp pieces causing machine CSE
> crash. I
vikramRH wrote:
> > [AMDGPU] Enable atomic optimizer for divergent i64 and double values
>
> Needs some i64 tests
added new i64 tests, however I see there currently exists an issue with DPP
path where dpp combine partially fuses the mov_dpp pieces causing machine CSE
crash. I have proposed ht
@@ -178,6 +178,21 @@ bool AMDGPUAtomicOptimizerImpl::run(Function &F) {
return Changed;
}
+static bool isOptimizableAtomic(Type *Ty) {
vikramRH wrote:
updated, thanks
https://github.com/llvm/llvm-project/pull/96934
_
@@ -230,8 +245,7 @@ void
AMDGPUAtomicOptimizerImpl::visitAtomicRMWInst(AtomicRMWInst &I) {
// value to the atomic calculation. We can only optimize divergent values if
// we have DPP available on our subtarget, and the atomic operation is 32
// bits.
- if (ValDivergent
@@ -178,6 +178,21 @@ bool AMDGPUAtomicOptimizerImpl::run(Function &F) {
return Changed;
}
+static bool isOptimizableAtomic(Type *Ty) {
+ switch (Ty->getTypeID()) {
+ case Type::FloatTyID:
+ case Type::DoubleTyID:
+return true;
+ case Type::IntegerTyID: {
+unsigne
https://github.com/smithp35 commented:
I agree with jh7370 that it would be good to extract the decoding logic, it
seems like each tool needs some way of passing in a way to step through the
data, return the decoded data, and a way of storing errors. It is possible that
this will end up being
@@ -2687,6 +2687,15 @@ void Dumper::printRelocations() {
<< "VALUE\n";
for (SectionRef Section : P.second) {
+ // CREL requires decoding and has its specific errors.
smithp35 wrote:
I recommend
```
// CREL sections require decoding, each s
https://github.com/smithp35 edited
https://github.com/llvm/llvm-project/pull/97382
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -1453,6 +1525,15 @@ template bool
ELFObjectFile::isRelocatableObject() const {
return EF.getHeader().e_type == ELF::ET_REL;
}
+template
+StringRef ELFObjectFile::getCrelError(DataRefImpl Sec) const {
+ uintptr_t SHT = reinterpret_cast(cantFail(EF.sections()).begin());
@@ -292,6 +295,11 @@ template class ELFObjectFile : public
ELFObjectFileBase {
const Elf_Shdr *DotSymtabSec = nullptr; // Symbol table section.
const Elf_Shdr *DotSymtabShndxSec = nullptr; // SHT_SYMTAB_SHNDX section.
+ // Hold CREL relocations for SectionRef::relocatio
@@ -2687,6 +2687,15 @@ void Dumper::printRelocations() {
<< "VALUE\n";
for (SectionRef Section : P.second) {
+ // CREL requires decoding and has its specific errors.
+ if (O.isELF() && ELFSectionRef(Section).getType() == ELF::SHT_CREL) {
+const
5chmidti wrote:
Thanks.
> ... how this impacts build times for Clang itself? I'm assuming that if
> ASTMatchers.h isn't modified, CMake won't re-run
> generate_ast_matcher_doc_tests.py and so the compile time performance hit is
> only on full rebuilds or when changing the header?
The 'state'
@@ -1022,6 +1033,47 @@ ELFObjectFile::section_rel_begin(DataRefImpl Sec)
const {
uintptr_t SHT = reinterpret_cast((*SectionsOrErr).begin());
RelData.d.a = (Sec.p - SHT) / EF.getHeader().e_shentsize;
RelData.d.b = 0;
+ if (reinterpret_cast(Sec.p)->sh_type == ELF::SHT_CRE
71 matches
Mail list logo