From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 3333E3857033; Wed, 8 Sep 2021 11:20:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3333E3857033 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/casm-state-v2)] Save asm_out_state with PCH. X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/casm-state-v2 X-Git-Oldrev: a4e22ef8a32a20dca19716bc9f73b96d48fe1f9e X-Git-Newrev: 03268cc27d8c0638b67c219cafc2a4bb7d83c133 Message-Id: <20210908112014.3333E3857033@sourceware.org> Date: Wed, 8 Sep 2021 11:20:14 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2021 11:20:14 -0000 https://gcc.gnu.org/g:03268cc27d8c0638b67c219cafc2a4bb7d83c133 commit 03268cc27d8c0638b67c219cafc2a4bb7d83c133 Author: Martin Liska Date: Wed Sep 8 13:08:26 2021 +0200 Save asm_out_state with PCH. Diff: --- gcc/ggc-common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c index 32ba5be42b2..c383605f813 100644 --- a/gcc/ggc-common.c +++ b/gcc/ggc-common.c @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see #include "hosthooks.h" #include "plugin.h" #include "options.h" +#include "output.h" /* When true, protect the contents of the identifier hash table. */ bool ggc_protect_identifiers = true; @@ -589,6 +590,9 @@ gt_pch_restore (FILE *f) struct mmap_info mmi; int result; + /* Hide ASM state object as we don't want it to be streamed. */ + FILE *saved_casm_out_file = casm->out_file; + /* Delete any deletable objects. This makes ggc_pch_read much faster, as it can be sure that no GCable objects remain other than the ones just read in. */ @@ -629,6 +633,8 @@ gt_pch_restore (FILE *f) ggc_pch_read (f, mmi.preferred_base); gt_pch_restore_stringpool (); + + casm->out_file = saved_casm_out_file; } /* Default version of HOST_HOOKS_GT_PCH_GET_ADDRESS when mmap is not present.