public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1129] LTO: stream properly FUNCTION_DECL_DECL_TYPE. Date: Mon, 31 May 2021 09:28:51 +0000 (GMT) [thread overview] Message-ID: <20210531092851.1693F3854803@sourceware.org> (raw) https://gcc.gnu.org/g:21d7bba242f1a7349adc6a57aa4c874f7bb159f8 commit r12-1129-g21d7bba242f1a7349adc6a57aa4c874f7bb159f8 Author: Martin Liska <mliska@suse.cz> Date: Mon May 24 11:18:21 2021 +0200 LTO: stream properly FUNCTION_DECL_DECL_TYPE. gcc/lto/ChangeLog: * lto-common.c (compare_tree_sccs_1): Compare FUNCTION_DECL_DECL_TYPE. gcc/ChangeLog: * tree-streamer-in.c (unpack_ts_function_decl_value_fields): Unpack FUNCTION_DECL_DECL_TYPE. * tree-streamer-out.c (pack_ts_function_decl_value_fields): Stream FUNCTION_DECL_DECL_TYPE instead of DECL_IS_OPERATOR_NEW_P. * tree.h (set_function_decl_type): Use FUNCTION_DECL_DECL_TYPE macro. (DECL_IS_OPERATOR_NEW_P): Likewise. (DECL_IS_OPERATOR_DELETE_P): Likewise. (DECL_LAMBDA_FUNCTION_P): Likewise. Diff: --- gcc/lto/lto-common.c | 2 +- gcc/tree-streamer-in.c | 2 +- gcc/tree-streamer-out.c | 2 +- gcc/tree.h | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/lto/lto-common.c b/gcc/lto/lto-common.c index 02d16f49c11..bfe52a2e942 100644 --- a/gcc/lto/lto-common.c +++ b/gcc/lto/lto-common.c @@ -1235,7 +1235,7 @@ compare_tree_sccs_1 (tree t1, tree t2, tree **map) compare_values (DECL_IS_NOVOPS); compare_values (DECL_IS_RETURNS_TWICE); compare_values (DECL_IS_MALLOC); - compare_values (DECL_IS_OPERATOR_NEW_P); + compare_values (FUNCTION_DECL_DECL_TYPE); compare_values (DECL_DECLARED_INLINE_P); compare_values (DECL_STATIC_CHAIN); compare_values (DECL_NO_INLINE_WARNING_P); diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index 984b1e269cf..e0522bf2ac1 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -333,7 +333,7 @@ unpack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr) DECL_IS_NOVOPS (expr) = (unsigned) bp_unpack_value (bp, 1); DECL_IS_RETURNS_TWICE (expr) = (unsigned) bp_unpack_value (bp, 1); DECL_IS_MALLOC (expr) = (unsigned) bp_unpack_value (bp, 1); - DECL_SET_IS_OPERATOR_NEW (expr, (unsigned) bp_unpack_value (bp, 1)); + FUNCTION_DECL_DECL_TYPE (expr) = (function_decl_type) bp_unpack_value (bp, 2); DECL_SET_IS_OPERATOR_DELETE (expr, (unsigned) bp_unpack_value (bp, 1)); DECL_DECLARED_INLINE_P (expr) = (unsigned) bp_unpack_value (bp, 1); DECL_STATIC_CHAIN (expr) = (unsigned) bp_unpack_value (bp, 1); diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index 1a43534d117..855d1cd59b9 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -298,7 +298,7 @@ pack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr) bp_pack_value (bp, DECL_IS_NOVOPS (expr), 1); bp_pack_value (bp, DECL_IS_RETURNS_TWICE (expr), 1); bp_pack_value (bp, DECL_IS_MALLOC (expr), 1); - bp_pack_value (bp, DECL_IS_OPERATOR_NEW_P (expr), 1); + bp_pack_value (bp, FUNCTION_DECL_DECL_TYPE (expr), 2); bp_pack_value (bp, DECL_IS_OPERATOR_DELETE_P (expr), 1); bp_pack_value (bp, DECL_DECLARED_INLINE_P (expr), 1); bp_pack_value (bp, DECL_STATIC_CHAIN (expr), 1); diff --git a/gcc/tree.h b/gcc/tree.h index 5935d0e9f7c..260a3ae6c83 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3111,7 +3111,7 @@ set_function_decl_type (tree decl, function_decl_type t, bool set) { gcc_assert (FUNCTION_DECL_DECL_TYPE (decl) == NONE || FUNCTION_DECL_DECL_TYPE (decl) == t); - decl->function_decl.decl_type = t; + FUNCTION_DECL_DECL_TYPE (decl) = t; } else if (FUNCTION_DECL_DECL_TYPE (decl) == t) FUNCTION_DECL_DECL_TYPE (decl) = NONE; @@ -3126,7 +3126,7 @@ set_function_decl_type (tree decl, function_decl_type t, bool set) C++ operator new, meaning that it returns a pointer for which we should not use type based aliasing. */ #define DECL_IS_OPERATOR_NEW_P(NODE) \ - (FUNCTION_DECL_CHECK (NODE)->function_decl.decl_type == OPERATOR_NEW) + (FUNCTION_DECL_DECL_TYPE (FUNCTION_DECL_CHECK (NODE)) == OPERATOR_NEW) #define DECL_IS_REPLACEABLE_OPERATOR_NEW_P(NODE) \ (DECL_IS_OPERATOR_NEW_P (NODE) && DECL_IS_REPLACEABLE_OPERATOR (NODE)) @@ -3137,7 +3137,7 @@ set_function_decl_type (tree decl, function_decl_type t, bool set) /* Nonzero in a FUNCTION_DECL means this function should be treated as C++ operator delete. */ #define DECL_IS_OPERATOR_DELETE_P(NODE) \ - (FUNCTION_DECL_CHECK (NODE)->function_decl.decl_type == OPERATOR_DELETE) + (FUNCTION_DECL_DECL_TYPE (FUNCTION_DECL_CHECK (NODE)) == OPERATOR_DELETE) #define DECL_SET_IS_OPERATOR_DELETE(NODE, VAL) \ set_function_decl_type (FUNCTION_DECL_CHECK (NODE), OPERATOR_DELETE, VAL) @@ -3288,7 +3288,7 @@ extern vec<tree, va_gc> **decl_debug_args_insert (tree); /* In FUNCTION_DECL, this is set if this function is a lambda function. */ #define DECL_LAMBDA_FUNCTION_P(NODE) \ - (FUNCTION_DECL_CHECK (NODE)->function_decl.decl_type == LAMBDA_FUNCTION) + (FUNCTION_DECL_DECL_TYPE (FUNCTION_DECL_CHECK (NODE)) == LAMBDA_FUNCTION) #define DECL_SET_LAMBDA_FUNCTION(NODE, VAL) \ set_function_decl_type (FUNCTION_DECL_CHECK (NODE), LAMBDA_FUNCTION, VAL)
reply other threads:[~2021-05-31 9:28 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210531092851.1693F3854803@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).