]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/genmddump.cc
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / genmddump.cc
CommitLineData
ad25c558 1/* Generate code from machine description to recognize rtl as insns.
aeee4812 2 Copyright (C) 1987-2023 Free Software Foundation, Inc.
ad25c558
KY
3
4 This file is part of GCC.
5
6 GCC is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
10
11 GCC is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
19
20
21/* This program is used to produce tmp-mddump.md, which represents
22 md-file with expanded iterators and after define_subst transformation
23 is performed.
24
25 The only argument of the program is a source md-file (e.g.
26 config/i386/i386.md). STDERR is used for the program output. */
27
28#include "bconfig.h"
29#include "system.h"
30#include "coretypes.h"
31#include "tm.h"
32#include "rtl.h"
33#include "errors.h"
34#include "read-md.h"
35#include "gensupport.h"
36
37\f
e796fd77 38extern int main (int, const char **);
ad25c558
KY
39
40int
e796fd77 41main (int argc, const char **argv)
ad25c558 42{
ad25c558
KY
43 progname = "genmddump";
44
45 if (!init_rtx_reader_args (argc, argv))
46 return (FATAL_EXIT_CODE);
47
48 /* Read the machine description. */
5d2d3e43
RS
49 md_rtx_info info;
50 while (read_md_rtx (&info))
ad25c558 51 {
5d2d3e43
RS
52 printf (";; %s: %d\n", info.loc.filename, info.loc.lineno);
53 print_inline_rtx (stdout, info.def, 0);
ad25c558
KY
54 printf ("\n\n");
55 }
56
57 fflush (stdout);
58 return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
59}