Skip to content

Commit 1900019

Browse files
dcandlerpratlucas
authored andcommitted
[ATfE] Update downstream performance patches (#107)
The `Additional unrolling in LTO` patch has been rebased against an upstream change, while `Prefer MEMCPY LDM/STM inlining for v7-m` has had the original commit message restored in order to provide context for the change. The filenames now also match the subject of the commit message, as they have been regenerated using git format-patch.
1 parent d382a3f commit 1900019

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

arm-software/embedded/patches/llvm-project-perf/0001-LTOpasses-add-loop-unroll.patch renamed to arm-software/embedded/patches/llvm-project-perf/0001-Pipelines-Additional-unrolling-in-LTO.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
From 4adfc5231d2c0182d6278b4aa75eec57648e5dd4 Mon Sep 17 00:00:00 2001
1+
From 47dd90545df09ec7f74a9a617cf3b63e9cf8f26b Mon Sep 17 00:00:00 2001
22
From: Vladi Krapp <[email protected]>
33
Date: Tue, 3 Sep 2024 14:12:48 +0100
4-
Subject: [Pipelines] Additional unrolling in LTO
4+
Subject: [Pipelines] Additional unrolling in LTO
55

66
Some workloads require specific sequences of events to happen
77
to fully simplify. This adds an extra full unrolling pass to help these
88
cases on the cores with branch predictors. It helps produce simplified
99
loops, which can then be SROA'd allowing further simplification, which
1010
can be important for performance.
11-
Feature adds extra compile time to get extra performance and
11+
Feature adds extra compile time to get extra performance and
1212
is enabled by the opt flag 'extra-LTO-loop-unroll' (off by default).
1313

1414
Original patch by David Green ([email protected])
@@ -17,7 +17,7 @@ Original patch by David Green ([email protected])
1717
1 file changed, 16 insertions(+)
1818

1919
diff --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp
20-
index 1184123c7710..6dc45d85927a 100644
20+
index 4632a0e46908..c625e2424f8b 100644
2121
--- a/llvm/lib/Passes/PassBuilderPipelines.cpp
2222
+++ b/llvm/lib/Passes/PassBuilderPipelines.cpp
2323
@@ -332,6 +332,10 @@ namespace llvm {
@@ -31,8 +31,8 @@ index 1184123c7710..6dc45d85927a 100644
3131
void PassBuilder::invokePeepholeEPCallbacks(FunctionPassManager &FPM,
3232
OptimizationLevel Level) {
3333
for (auto &C : PeepholeEPCallbacks)
34-
@@ -1940,6 +1944,18 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level,
35-
MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(ArgumentPromotionPass()));
34+
@@ -2018,6 +2022,18 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level,
35+
MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM)));
3636

3737
FunctionPassManager FPM;
3838
+
@@ -51,5 +51,5 @@ index 1184123c7710..6dc45d85927a 100644
5151
FPM.addPass(InstCombinePass());
5252
invokePeepholeEPCallbacks(FPM, Level);
5353
--
54-
2.34.1
54+
2.43.0
5555

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
From 411bab1ff439215c060127b6a5188ed0c9ed5d65 Mon Sep 17 00:00:00 2001
2-
From: Vrukesh V Panse <vrukesh.panse@arm.com>
3-
Date: Thu, 2 Jan 2025 10:29:56 +0000
4-
Subject: [NFC]: Update the patch file with upstream changes of SelectionDAG
1+
From 56b1d9becf044649a759129b986de71cc43b4c29 Mon Sep 17 00:00:00 2001
2+
From: Scott Douglass <scott.douglass@arm.com>
3+
Date: Tue, 13 Aug 2024 10:55:51 +0100
4+
Subject: [ARM][CodeGen]Prefer MEMCPY LDM/STM inlining for v7-m
55

6+
This patch changes the behaviour of memcpy inlining on v7m targets.
7+
The old behaviour was to inline memcpys with LDM/STM instructions.
8+
Alternatively, using LD/ST instructions for memcpy inlining allowed
9+
for performance gains of 1% to 2% on selected benchmarks.
10+
11+
Co-authored-by: Nashe Mncube <[email protected]>
612
---
713
llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp | 120 +++++++++++++++
814
llvm/lib/Target/ARM/ARMSelectionDAGInfo.h | 6 +
@@ -340,5 +346,5 @@ index 000000000000..e549958494dc
340346
+ ret void
341347
+}
342348
--
343-
2.34.1
349+
2.43.0
344350

0 commit comments

Comments
 (0)