Debian Codegraph @

gcc/config/gcn/gen-opt-tables.awk

raw
1 # Generate gcn-tables.opt from gcn-devices.def
2 #
3 # Copyright (C) 2024-2025 Free Software Foundation, Inc.
4 #
5 # This file is part of GCC.
6 #
7 # GCC is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3, or (at your option)
10 # any later version.
11 #
12 # GCC is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with GCC; see the file COPYING3. If not see
19 # <http://www.gnu.org/licenses/>.
20
21 BEGIN {
22 FS= "[(,] *"
23
24 print "; -*- buffer-read-only: t -*-"
25 print "; Generated automatically by gen-opt-tables.awk from gcn-devices.def."
26 print "; Do not edit."
27 print ""
28 print "; Copyright (C) 2024-2025 Free Software Foundation, Inc."
29 print ""
30 print "; This file is part of GCC."
31 print ""
32 print "; GCC is free software; you can redistribute it and/or modify"
33 print "; it under the terms of the GNU General Public License as"
34 print "; published by the Free Software Foundation; either version 3,"
35 print "; or (at your option) any later version."
36 print ""
37 print "; GCC is distributed in the hope that it will be useful,"
38 print "; but WITHOUT ANY WARRANTY; without even the implied warranty of"
39 print "; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
40 print "; GNU General Public License for more details."
41 print ""
42 print "; You should have received a copy of the GNU General Public"
43 print "; License along with GCC; see the file COPYING3. If not see"
44 print "; <http://www.gnu.org/licenses/>."
45 print ""
46 print "Enum"
47 print "Name(gpu_type) Type(enum processor_type)"
48 print "GCN GPU type to use:"
49 }
50
51 /^GCN_DEVICE\(/ {
52 print ""
53 print "EnumValue"
54 print "Enum(gpu_type) String(" $2 ") Value(PROCESSOR_" $3 ")"
55 }