]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/lto-streamer.h
re PR fortran/90329 (Incompatibility between gfortran and C lapack calls)
[gcc.git] / gcc / lto-streamer.h
index d5a330dfa51a8dfaa5dba0361b0cc3b64acf11eb..8337dcb602d6945b8cf7c5f6ea813ef3d8a3ea2d 100644 (file)
@@ -1,7 +1,7 @@
 /* Data structures and declarations used for reading and writing
    GIMPLE to a file stream.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2018 Free Software Foundation, Inc.
    Contributed by Doug Kwan <dougkwan@google.com>
 
 This file is part of GCC.
@@ -24,19 +24,9 @@ along with GCC; see the file COPYING3.  If not see
 #define GCC_LTO_STREAMER_H
 
 #include "plugin-api.h"
-#include "target.h"
-#include "alloc-pool.h"
 #include "gcov-io.h"
 #include "diagnostic.h"
 
-/* Define when debugging the LTO streamer.  This causes the writer
-   to output the numeric value for the memory address of the tree node
-   being emitted.  When debugging a problem in the reader, check the
-   original address that the writer was emitting using lto_orig_address_get.
-   With this value, set a breakpoint in the writer (e.g., lto_output_tree)
-   to trace how the faulty node is being emitted.  */
-/* #define LTO_STREAMER_DEBUG  1  */
-
 /* The encoding for a function consists of the following sections:
 
    1)    The header.
@@ -130,8 +120,8 @@ along with GCC; see the file COPYING3.  If not see
      String are represented in the table as pairs, a length in ULEB128
      form followed by the data for the string.  */
 
-#define LTO_major_version 4
-#define LTO_minor_version 0
+#define LTO_major_version 7
+#define LTO_minor_version 2
 
 typedef unsigned char  lto_decl_flags_t;
 
@@ -164,9 +154,6 @@ enum LTO_tags
   /* EH region holding the previous statement.  */
   LTO_eh_region,
 
-  /* An MD or NORMAL builtin.  Only the code and class are streamed out.  */
-  LTO_builtin_decl,
-
   /* Shared INTEGER_CST node.  */
   LTO_integer_cst,
 
@@ -241,11 +228,12 @@ enum lto_section_type
   LTO_section_symtab_nodes,
   LTO_section_opts,
   LTO_section_cgraph_opt_sum,
-  LTO_section_inline_summary,
+  LTO_section_ipa_fn_summary,
   LTO_section_ipcp_transform,
   LTO_section_ipa_icf,
   LTO_section_offload_table,
   LTO_section_mode_table,
+  LTO_section_ipa_hsa,
   LTO_N_SECTION_TYPES          /* Must be last.  */
 };
 
@@ -322,7 +310,7 @@ public:
                       struct data_in *data_in);
   lto_location_cache ()
      : loc_cache (), accepted_length (0), current_file (NULL), current_line (0),
-       current_col (0), current_loc (UNKNOWN_LOCATION)
+       current_col (0), current_sysp (false), current_loc (UNKNOWN_LOCATION)
   {
     gcc_assert (!current_cache);
     current_cache = this;
@@ -347,6 +335,7 @@ private:
     const char *file;
     location_t *loc;
     int line, col;
+    bool sysp;
   };
 
   /* The location cache.  */
@@ -366,6 +355,7 @@ private:
   const char *current_file;
   int current_line;
   int current_col;
+  bool current_sysp;
   location_t current_loc;
 };
 
@@ -407,9 +397,6 @@ struct lto_simple_header : lto_header
 
 struct lto_simple_header_with_strings : lto_simple_header
 {
-  /* Size of main gimple body of function.  */
-  int32_t main_size;
-
   /* Size of the string table.  */
   int32_t string_size;
 };
@@ -504,6 +491,9 @@ struct GTY((for_user)) lto_in_decl_state
   /* If this in-decl state is associated with a function. FN_DECL
      point to the FUNCTION_DECL. */
   tree fn_decl;
+
+  /* True if decl state is compressed.  */
+  bool compressed;
 };
 
 typedef struct lto_in_decl_state *lto_in_decl_state_ptr;
@@ -537,6 +527,9 @@ struct lto_out_decl_state
   /* If this out-decl state belongs to a function, fn_decl points to that
      function.  Otherwise, it is NULL. */
   tree fn_decl;
+
+  /* True if decl state is compressed.  */
+  bool compressed;
 };
 
 typedef struct lto_out_decl_state *lto_out_decl_state_ptr;
@@ -713,6 +706,7 @@ struct output_block
   const char *current_file;
   int current_line;
   int current_col;
+  bool current_sysp;
 
   /* Cache of nodes written in this section.  */
   struct streamer_tree_cache_d *writer_cache;
@@ -760,10 +754,18 @@ extern void lto_set_in_hooks (struct lto_file_decl_data **,
 extern struct lto_file_decl_data **lto_get_file_decl_data (void);
 extern const char *lto_get_section_data (struct lto_file_decl_data *,
                                         enum lto_section_type,
-                                        const char *, size_t *);
+                                        const char *, size_t *,
+                                        bool decompress = false);
+extern const char *lto_get_raw_section_data (struct lto_file_decl_data *,
+                                            enum lto_section_type,
+                                            const char *, size_t *);
 extern void lto_free_section_data (struct lto_file_decl_data *,
-                                  enum lto_section_type,
-                                  const char *, const char *, size_t);
+                                  enum lto_section_type,
+                                  const char *, const char *, size_t,
+                                  bool decompress = false);
+extern void lto_free_raw_section_data (struct lto_file_decl_data *,
+                                      enum lto_section_type,
+                                      const char *, const char *, size_t);
 extern htab_t lto_create_renaming_table (void);
 extern void lto_record_renamed_decl (struct lto_file_decl_data *,
                                     const char *, const char *);
@@ -784,6 +786,7 @@ extern void lto_value_range_error (const char *,
 extern void lto_begin_section (const char *, bool);
 extern void lto_end_section (void);
 extern void lto_write_data (const void *, unsigned int);
+extern void lto_write_raw_data (const void *, unsigned int);
 extern void lto_write_stream (struct lto_output_stream *);
 extern bool lto_output_decl_index (struct lto_output_stream *,
                            struct lto_tree_ref_encoder *,
@@ -825,12 +828,7 @@ extern char *lto_get_section_name (int, const char *, struct lto_file_decl_data
 extern void print_lto_report (const char *);
 extern void lto_streamer_init (void);
 extern bool gate_lto_out (void);
-#ifdef LTO_STREAMER_DEBUG
-extern void lto_orig_address_map (tree, intptr_t);
-extern intptr_t lto_orig_address_get (tree);
-extern void lto_orig_address_remove (tree);
-#endif
-extern void lto_check_version (int, int);
+extern void lto_check_version (int, int, const char *);
 extern void lto_streamer_hooks_init (void);
 
 /* In lto-streamer-in.c */
@@ -901,7 +899,7 @@ bool lto_symtab_encoder_encode_initializer_p (lto_symtab_encoder_t,
 void output_symtab (void);
 void input_symtab (void);
 void output_offload_tables (void);
-void input_offload_tables (void);
+void input_offload_tables (bool);
 bool referenced_from_other_partition_p (struct ipa_ref_list *,
                                        lto_symtab_encoder_t);
 bool reachable_from_other_partition_p (struct cgraph_node *,
@@ -926,11 +924,6 @@ void cl_optimization_stream_out (struct bitpack_d *, struct cl_optimization *);
 void cl_optimization_stream_in (struct bitpack_d *, struct cl_optimization *);
 
 
-/* In lto-symtab.c.  */
-extern void lto_symtab_merge_decls (void);
-extern void lto_symtab_merge_symbols (void);
-extern tree lto_symtab_prevailing_decl (tree decl);
-
 
 /* In lto-opts.c.  */
 extern void lto_write_options (void);
@@ -1219,4 +1212,14 @@ DEFINE_DECL_STREAM_FUNCS (TYPE_DECL, type_decl)
 DEFINE_DECL_STREAM_FUNCS (NAMESPACE_DECL, namespace_decl)
 DEFINE_DECL_STREAM_FUNCS (LABEL_DECL, label_decl)
 
+/* Entry for the delayed registering of decl -> DIE references.  */
+struct dref_entry {
+    tree decl;
+    const char *sym;
+    unsigned HOST_WIDE_INT off;
+};
+
+extern vec<dref_entry> dref_queue;
+
+
 #endif /* GCC_LTO_STREAMER_H  */
This page took 0.035421 seconds and 5 git commands to generate.