public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/95842] New: arch_names_table and processor_alias_table should be combined
@ 2020-06-23 14:07 hjl.tools at gmail dot com
2020-06-23 14:22 ` [Bug target/95842] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-06-23 14:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95842
Bug ID: 95842
Summary: arch_names_table and processor_alias_table should be
combined
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
CC: hubicka at ucw dot cz, ubizjak at gmail dot com
Target Milestone: ---
Target: i386,x86-64
i386-builtins.c has arch_names_table to map architecture name to internal
model and a switch statement to map internal processor name to architecture
name. When a new processor name is added, we need to update 3 different
places. We should put all these information in processor_alias_table. We
can update a single place in processor_alias_table to support a new processor.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/95842] arch_names_table and processor_alias_table should be combined
2020-06-23 14:07 [Bug target/95842] New: arch_names_table and processor_alias_table should be combined hjl.tools at gmail dot com
@ 2020-06-23 14:22 ` rguenth at gcc dot gnu.org
2020-06-23 22:25 ` hjl.tools at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-23 14:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95842
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2020-06-23
Status|UNCONFIRMED |NEW
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/95842] arch_names_table and processor_alias_table should be combined
2020-06-23 14:07 [Bug target/95842] New: arch_names_table and processor_alias_table should be combined hjl.tools at gmail dot com
2020-06-23 14:22 ` [Bug target/95842] " rguenth at gcc dot gnu.org
@ 2020-06-23 22:25 ` hjl.tools at gmail dot com
2020-06-24 11:20 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-06-23 22:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95842
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |https://gcc.gnu.org/piperma
| |il/gcc-patches/2020-June/54
| |8780.html
Target Milestone|--- |11.0
Keywords| |patch
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
A patch is posted at
https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548780.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/95842] arch_names_table and processor_alias_table should be combined
2020-06-23 14:07 [Bug target/95842] New: arch_names_table and processor_alias_table should be combined hjl.tools at gmail dot com
2020-06-23 14:22 ` [Bug target/95842] " rguenth at gcc dot gnu.org
2020-06-23 22:25 ` hjl.tools at gmail dot com
@ 2020-06-24 11:20 ` cvs-commit at gcc dot gnu.org
2020-06-24 11:26 ` hjl.tools at gmail dot com
2021-03-31 9:57 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-24 11:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95842
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:
https://gcc.gnu.org/g:3fb2c2f4d0a43b96e9e4907db952e57a5cbe61ef
commit r11-1623-g3fb2c2f4d0a43b96e9e4907db952e57a5cbe61ef
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jun 23 12:49:32 2020 -0700
x86: Fold arch_names_table into processor_alias_table
In i386-builtins.c, arch_names_table is used to to map architecture name
string to internal model. A switch statement is used to map internal
processor name to architecture name string and internal priority.
model and priority are added to processor_alias_table so that a single
entry contains architecture name string, internal processor name,
internal model and internal priority. 6 entries are appended for
i386-builtins.c, which have special architecture name strings: amd,
amdfam10h, amdfam15h, amdfam17h, shanghai and istanbul, and pta_size is
adjusted to exclude them. Entries which are not used by i386-builtins.c
have internal model 0. P_PROC_DYNAMIC is added to internal priority to
make entries with dynamic architecture name string or priority.
PR target/95842
* common/config/i386/i386-common.c (processor_alias_table): Add
processor model and priority to each entry.
(pta_size): Updated with -6.
(num_arch_names): New.
* common/config/i386/i386-cpuinfo.h: New file.
* config/i386/i386-builtins.c (feature_priority): Removed.
(processor_model): Likewise.
(_arch_names_table): Likewise.
(arch_names_table): Likewise.
(_isa_names_table): Replace P_ZERO with P_NONE.
(get_builtin_code_for_version): Replace P_ZERO with P_NONE. Use
processor_alias_table.
(fold_builtin_cpu): Replace arch_names_table with
processor_alias_table.
* config/i386/i386.h: Include "common/config/i386/i386-cpuinfo.h".
(pta): Add model and priority.
(num_arch_names): New.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/95842] arch_names_table and processor_alias_table should be combined
2020-06-23 14:07 [Bug target/95842] New: arch_names_table and processor_alias_table should be combined hjl.tools at gmail dot com
` (2 preceding siblings ...)
2020-06-24 11:20 ` cvs-commit at gcc dot gnu.org
@ 2020-06-24 11:26 ` hjl.tools at gmail dot com
2021-03-31 9:57 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-06-24 11:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95842
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/95842] arch_names_table and processor_alias_table should be combined
2020-06-23 14:07 [Bug target/95842] New: arch_names_table and processor_alias_table should be combined hjl.tools at gmail dot com
` (3 preceding siblings ...)
2020-06-24 11:26 ` hjl.tools at gmail dot com
@ 2021-03-31 9:57 ` cvs-commit at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-31 9:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95842
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jan Hubicka
<hubicka@gcc.gnu.org>:
https://gcc.gnu.org/g:a42a5600c5917541481c3de29a95c1cb169edc6b
commit r10-9630-ga42a5600c5917541481c3de29a95c1cb169edc6b
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jun 23 12:49:32 2020 -0700
x86: Fold arch_names_table into processor_alias_table
In i386-builtins.c, arch_names_table is used to to map architecture name
string to internal model. A switch statement is used to map internal
processor name to architecture name string and internal priority.
model and priority are added to processor_alias_table so that a single
entry contains architecture name string, internal processor name,
internal model and internal priority. 6 entries are appended for
i386-builtins.c, which have special architecture name strings: amd,
amdfam10h, amdfam15h, amdfam17h, shanghai and istanbul, and pta_size is
adjusted to exclude them. Entries which are not used by i386-builtins.c
have internal model 0. P_PROC_DYNAMIC is added to internal priority to
make entries with dynamic architecture name string or priority.
PR target/95842
* common/config/i386/i386-common.c (processor_alias_table): Add
processor model and priority to each entry.
(pta_size): Updated with -6.
(num_arch_names): New.
* common/config/i386/i386-cpuinfo.h: New file.
* config/i386/i386-builtins.c (feature_priority): Removed.
(processor_model): Likewise.
(_arch_names_table): Likewise.
(arch_names_table): Likewise.
(_isa_names_table): Replace P_ZERO with P_NONE.
(get_builtin_code_for_version): Replace P_ZERO with P_NONE. Use
processor_alias_table.
(fold_builtin_cpu): Replace arch_names_table with
processor_alias_table.
* config/i386/i386.h: Include "common/config/i386/i386-cpuinfo.h".
(pta): Add model and priority.
(num_arch_names): New.
(cherry picked from commit 3fb2c2f4d0a43b96e9e4907db952e57a5cbe61ef)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-31 9:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23 14:07 [Bug target/95842] New: arch_names_table and processor_alias_table should be combined hjl.tools at gmail dot com
2020-06-23 14:22 ` [Bug target/95842] " rguenth at gcc dot gnu.org
2020-06-23 22:25 ` hjl.tools at gmail dot com
2020-06-24 11:20 ` cvs-commit at gcc dot gnu.org
2020-06-24 11:26 ` hjl.tools at gmail dot com
2021-03-31 9:57 ` cvs-commit at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).