1 |
commit: 0bc14fb37320230d55449627a143c97cb187bdf1 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 31 23:07:39 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 31 23:07:39 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0bc14fb3 |
7 |
|
8 |
9.3.0: increase expmed cache size from 10^3 to 10^6 |
9 |
|
10 |
Without this patch is takes dev-libs/xxhash 1-2 hours |
11 |
to compile. With this patch - TODO measurements. |
12 |
|
13 |
It workarounds deficiency of synth_mult() which evics |
14 |
cache entries as it calculates optimal multiplication |
15 |
algorithm. xxhash is especially hevyweight as it's a |
16 |
64-bit multiplication of large prime constants. |
17 |
|
18 |
Bug: https://gcc.gnu.org/PR87256 |
19 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
20 |
|
21 |
9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch | 44 ++++++++++++++++++++++++ |
22 |
9.3.0/gentoo/README.history | 1 + |
23 |
2 files changed, 45 insertions(+) |
24 |
|
25 |
diff --git a/9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch b/9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch |
26 |
new file mode 100644 |
27 |
index 0000000..e93aa40 |
28 |
--- /dev/null |
29 |
+++ b/9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch |
30 |
@@ -0,0 +1,44 @@ |
31 |
+From 73a841928cc1b86f43108d2383a6242e7e61a785 Mon Sep 17 00:00:00 2001 |
32 |
+From: Sergei Trofimovich <slyfox@g.o> |
33 |
+Date: Tue, 31 Mar 2020 23:58:05 +0100 |
34 |
+Subject: [PATCH] gcc/expmed.h: increase cache size from 10^3 to 10^6 |
35 |
+ |
36 |
+Without this patch is takes dev-libs/xxhash 1-2 hours |
37 |
+to compile. With this patch - TODO measurements. |
38 |
+ |
39 |
+It workarounds deficiency of synth_mult() which evics |
40 |
+cache entries as it calculates optimal multiplication |
41 |
+algorithm. xxhash is especially hevyweight as it's a |
42 |
+64-bit multiplication of large prime constants. |
43 |
+ |
44 |
+Bug: https://gcc.gnu.org/PR87256 |
45 |
+Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
46 |
+--- |
47 |
+ gcc/expmed.h | 13 ++++++++----- |
48 |
+ 1 file changed, 8 insertions(+), 5 deletions(-) |
49 |
+ |
50 |
+--- a/gcc/expmed.h |
51 |
++++ b/gcc/expmed.h |
52 |
+@@ -127,11 +127,14 @@ struct alg_hash_entry { |
53 |
+ }; |
54 |
+ |
55 |
+ /* The number of cache/hash entries. */ |
56 |
+-#if HOST_BITS_PER_WIDE_INT == 64 |
57 |
+-#define NUM_ALG_HASH_ENTRIES 1031 |
58 |
+-#else |
59 |
+-#define NUM_ALG_HASH_ENTRIES 307 |
60 |
+-#endif |
61 |
++/* |
62 |
++ * Workaround hppa2.0 synth_mult deficiency |
63 |
++ * and allocate ~1 million slots: |
64 |
++ * https://gcc.gnu.org/PR87256 |
65 |
++ * That should increase RAM usage up to ~24MB |
66 |
++ * per process. |
67 |
++ */ |
68 |
++#define NUM_ALG_HASH_ENTRIES 1000003 |
69 |
+ |
70 |
+ #define NUM_MODE_INT \ |
71 |
+ (MAX_MODE_INT - MIN_MODE_INT + 1) |
72 |
+-- |
73 |
+2.26.0 |
74 |
+ |
75 |
|
76 |
diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history |
77 |
index e5865d4..5da5a24 100644 |
78 |
--- a/9.3.0/gentoo/README.history |
79 |
+++ b/9.3.0/gentoo/README.history |
80 |
@@ -2,6 +2,7 @@ |
81 |
- 04_all_default-ssp-fix.patch |
82 |
+ 04_all_nossp-on-nostdlib.patch |
83 |
+ 27_all_default_ssp-buffer-size.patch |
84 |
+ + 28_all_hppa-faster-synth_mult.patch |
85 |
|
86 |
1 12 Mar 2019 |
87 |
+ 01_all_default-fortify-source.patch |