aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer.h
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-12-13 03:12:15 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2015-12-13 02:12:15 +0000
commitca83487662329ae9130ffbf72fae7dbfe4fddb83 (patch)
treed18c6e4f8e505e7d6ec7206494843089e5e6d216 /gcc/lto-streamer.h
parentb44c0c0c7fd037165e5c8ddd20d5f2986e29d309 (diff)
downloadgcc-ca83487662329ae9130ffbf72fae7dbfe4fddb83.zip
gcc-ca83487662329ae9130ffbf72fae7dbfe4fddb83.tar.gz
gcc-ca83487662329ae9130ffbf72fae7dbfe4fddb83.tar.bz2
cgraph.c (cgraph_node::get_untransformed_body): Pass compressed flag to lto_get_section_data.
* cgraph.c (cgraph_node::get_untransformed_body): Pass compressed flag to lto_get_section_data. * varpool.c (varpool_node::get_constructor): Likewise. * lto-section-in.c (lto_get_section_data): Add new flag decompress. (lto_free_section_data): Likewise. (lto_get_raw_section_data): New function. (lto_free_raw_section_data): New function. (copy_function_or_variable): Copy sections w/o decompressing. (lto_output_decl_state_refs): Picke compressed bit. * lto-streamer.h (lto_in_decl_state): New flag compressed. (lto_out_decl_state): Likewise. (lto_get_section_data, lto_free_section_data): Update prototypes (lto_get_raw_section_data, lto_free_raw_section_data): Declare. (lto_write_raw_data): Declare. (lto_begin_section): Remove FIXME. (lto_write_raw_data): New function. (lto_write_stream): Remove FIXME. (lto_new_out_decl_state): Set compressed flag. * lto.c (lto_read_in_decl_state): Unpickle compressed bit. From-SVN: r231593
Diffstat (limited to 'gcc/lto-streamer.h')
-rw-r--r--gcc/lto-streamer.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index f4997aa..06c8d7a 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -501,6 +501,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;
@@ -534,6 +537,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;
@@ -758,10 +764,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 *);
@@ -782,6 +796,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 *,