diff gcc/read-rtl-function.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line diff
--- a/gcc/read-rtl-function.c	Thu Oct 25 07:37:49 2018 +0900
+++ b/gcc/read-rtl-function.c	Thu Feb 13 11:34:05 2020 +0900
@@ -1,5 +1,5 @@
 /* read-rtl-function.c - Reader for RTL function dumps
-   Copyright (C) 2016-2018 Free Software Foundation, Inc.
+   Copyright (C) 2016-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -41,6 +41,8 @@
 #include "read-rtl-function.h"
 #include "selftest.h"
 #include "selftest-rtl.h"
+#include "regs.h"
+#include "function-abi.h"
 
 /* Forward decls.  */
 class function_reader;
@@ -52,8 +54,9 @@
    at LOC, which will be turned into an actual CFG edge once
    the "insn-chain" is fully parsed.  */
 
-struct deferred_edge
+class deferred_edge
 {
+public:
   deferred_edge (file_location loc, int src_bb_idx, int dest_bb_idx, int flags)
   : m_loc (loc), m_src_bb_idx (src_bb_idx), m_dest_bb_idx (dest_bb_idx),
     m_flags (flags)
@@ -112,7 +115,7 @@
 					int operand_idx, int bb_idx);
 
   void add_fixup_source_location (file_location loc, rtx_insn *insn,
-				  const char *filename, int lineno);
+				  const char *filename, int lineno, int colno);
 
   void add_fixup_expr (file_location loc, rtx x,
 		       const char *desc);
@@ -707,7 +710,7 @@
   } while (0);
 #include "cfg-flags.def"
 #undef DEF_EDGE_FLAG
-  error ("unrecognized edge flag: '%s'", tok);
+  error ("unrecognized edge flag: %qs", tok);
   return 0;
 }
 
@@ -978,7 +981,7 @@
       if (strcmp (name.string, strings[i]) == 0)
 	return i;
     }
-  error ("unrecognized enum value: '%s'", name.string);
+  error ("unrecognized enum value: %qs", name.string);
   return 0;
 }
 
@@ -1368,7 +1371,7 @@
 
 void
 function_reader::add_fixup_source_location (file_location, rtx_insn *,
-					    const char *, int)
+					    const char *, int, int)
 {
 }
 
@@ -1554,7 +1557,20 @@
       require_char (':');
       struct md_name line_num;
       read_name (&line_num);
-      add_fixup_source_location (loc, insn, filename, atoi (line_num.string));
+
+      int column = 0;
+      int ch = read_char ();
+      if (ch == ':')
+	{
+	  struct md_name column_num;
+	  read_name (&column_num);
+	  column = atoi (column_num.string);
+	}
+      else
+	unread_char (ch);
+      add_fixup_source_location (loc, insn, filename,
+				 atoi (line_num.string),
+				 column);
     }
   else
     unread_char (ch);
@@ -1610,6 +1626,7 @@
 read_rtl_function_body (const char *path)
 {
   initialize_rtl ();
+  crtl->abi = &default_function_abi;
   init_emit ();
   init_varasm_status ();
 
@@ -1643,6 +1660,7 @@
     }
 
   initialize_rtl ();
+  crtl->abi = &fndecl_abi (cfun->decl).base_abi ();
   init_emit ();
   init_varasm_status ();