summaryrefslogtreecommitdiff
path: root/gcc/lto-section-out.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-27 10:13:12 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-27 10:13:12 +0000
commite0e4357b88efe5dc53e50d341a09de4d02331200 (patch)
treecafff2748190357bac05d69d344e79b0e38d1e27 /gcc/lto-section-out.c
parent7b48bf2011b4020c4a5a2d5d4149b03983f72cc2 (diff)
downloadgcc-tarball-e0e4357b88efe5dc53e50d341a09de4d02331200.tar.gz
gcc-6.1.0gcc-6.1.0
Diffstat (limited to 'gcc/lto-section-out.c')
-rw-r--r--gcc/lto-section-out.c64
1 files changed, 15 insertions, 49 deletions
diff --git a/gcc/lto-section-out.c b/gcc/lto-section-out.c
index 11b7cd0e97..f386507821 100644
--- a/gcc/lto-section-out.c
+++ b/gcc/lto-section-out.c
@@ -1,6 +1,6 @@
/* Functions for writing LTO sections.
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2016 Free Software Foundation, Inc.
Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
This file is part of GCC.
@@ -22,51 +22,13 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "hash-set.h"
-#include "machmode.h"
-#include "vec.h"
-#include "double-int.h"
-#include "input.h"
-#include "alias.h"
-#include "symtab.h"
-#include "wide-int.h"
-#include "inchash.h"
+#include "backend.h"
+#include "rtl.h"
#include "tree.h"
-#include "fold-const.h"
-#include "predict.h"
-#include "hard-reg-set.h"
-#include "function.h"
-#include "basic-block.h"
-#include "tree-ssa-alias.h"
-#include "internal-fn.h"
-#include "gimple-expr.h"
-#include "is-a.h"
#include "gimple.h"
-#include "hashtab.h"
-#include "rtl.h"
-#include "flags.h"
-#include "statistics.h"
-#include "real.h"
-#include "fixed-value.h"
-#include "insn-config.h"
-#include "expmed.h"
-#include "dojump.h"
-#include "explow.h"
-#include "calls.h"
-#include "emit-rtl.h"
-#include "varasm.h"
-#include "stmt.h"
-#include "expr.h"
-#include "params.h"
-#include "except.h"
-#include "langhooks.h"
-#include "hash-map.h"
-#include "plugin-api.h"
-#include "ipa-ref.h"
#include "cgraph.h"
#include "data-streamer.h"
-#include "lto-streamer.h"
+#include "langhooks.h"
#include "lto-compress.h"
static vec<lto_out_decl_state_ptr> decl_state_stack;
@@ -104,9 +66,6 @@ lto_begin_section (const char *name, bool compress)
{
lang_hooks.lto.begin_section (name);
- /* FIXME lto: for now, suppress compression if the lang_hook that appends
- data is anything other than assembler output. The effect here is that
- we get compression of IL only in non-ltrans object files. */
gcc_assert (compression_stream == NULL);
if (compress)
compression_stream = lto_start_compression (lto_append_data, NULL);
@@ -137,6 +96,14 @@ lto_write_data (const void *data, unsigned int size)
lang_hooks.lto.append_data ((const char *)data, size, NULL);
}
+/* Write SIZE bytes starting at DATA to the assembler. */
+
+void
+lto_write_raw_data (const void *data, unsigned int size)
+{
+ lang_hooks.lto.append_data ((const char *)data, size, NULL);
+}
+
/* Write all of the chars in OBS to the assembler. Recycle the blocks
in obs as this is being done. */
@@ -161,10 +128,6 @@ lto_write_stream (struct lto_output_stream *obs)
if (!next_block)
num_chars -= obs->left_in_block;
- /* FIXME lto: WPA mode uses an ELF function as a lang_hook to append
- output data. This hook is not happy with the way that compression
- blocks up output differently to the way it's blocked here. So for
- now, we don't compress WPA output. */
if (compression_stream)
lto_compress_block (compression_stream, base, num_chars);
else
@@ -333,6 +296,9 @@ lto_new_out_decl_state (void)
for (i = 0; i < LTO_N_DECL_STREAMS; i++)
lto_init_tree_ref_encoder (&state->streams[i]);
+ /* At WPA time we do not compress sections by default. */
+ state->compressed = !flag_wpa;
+
return state;
}