summaryrefslogtreecommitdiff
path: root/gcc/lto-streamer.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-06-06 12:55:52 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-06-06 12:55:52 +0000
commit15d16c8aeb03601b9a9e09c79abe58bbac4760fd (patch)
treeb2dc897ec282b0f9ce9eafb4d2b23ac9ebd353fd /gcc/lto-streamer.h
parent48df3acb54e3d5a623ba7b0890d5a75b502f22d1 (diff)
downloadgcc-15d16c8aeb03601b9a9e09c79abe58bbac4760fd.tar.gz
lto-streamer.h (enum LTO_tags): Move LTO_tree_pickle_reference after LTO_null.
2013-06-06 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Move LTO_tree_pickle_reference after LTO_null. (lto_tag_is_tree_code_p): Adjust. (lto_tag_is_gimple_code_p): Likewise. (lto_gimple_code_to_tag): Likewise. (lto_tag_to_gimple_code): Likewise. (lto_tree_code_to_tag): Likewise. (lto_tag_to_tree_code): Likewise. * data-streamer.h (streamer_write_hwi_in_range): Use uhwi streaming to stream the normalized range. (streamer_read_hwi_in_range): Likewise. From-SVN: r199732
Diffstat (limited to 'gcc/lto-streamer.h')
-rw-r--r--gcc/lto-streamer.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index 0f05d180183..a0eca6d8e2e 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -155,6 +155,9 @@ enum LTO_tags
{
LTO_null = 0,
+ /* Special for streamer. Reference to previously-streamed node. */
+ LTO_tree_pickle_reference,
+
/* Reserve enough entries to fit all the tree and gimple codes handled
by the streamer. This guarantees that:
@@ -196,9 +199,6 @@ enum LTO_tags
/* EH try/catch node. */
LTO_eh_catch,
- /* Special for global streamer. Reference to previously-streamed node. */
- LTO_tree_pickle_reference,
-
/* References to indexable tree nodes. These objects are stored in
tables that are written separately from the function bodies that
reference them. This way they can be instantiated even when the
@@ -921,7 +921,7 @@ extern vec<lto_out_decl_state_ptr> lto_function_decl_states;
static inline bool
lto_tag_is_tree_code_p (enum LTO_tags tag)
{
- return tag > LTO_null && (unsigned) tag <= MAX_TREE_CODES;
+ return tag > LTO_tree_pickle_reference && (unsigned) tag <= MAX_TREE_CODES;
}
@@ -929,8 +929,8 @@ lto_tag_is_tree_code_p (enum LTO_tags tag)
static inline bool
lto_tag_is_gimple_code_p (enum LTO_tags tag)
{
- return (unsigned) tag >= NUM_TREE_CODES + 1
- && (unsigned) tag < 1 + NUM_TREE_CODES + LAST_AND_UNUSED_GIMPLE_CODE;
+ return (unsigned) tag >= NUM_TREE_CODES + 2
+ && (unsigned) tag < 2 + NUM_TREE_CODES + LAST_AND_UNUSED_GIMPLE_CODE;
}
@@ -939,7 +939,7 @@ lto_tag_is_gimple_code_p (enum LTO_tags tag)
static inline enum LTO_tags
lto_gimple_code_to_tag (enum gimple_code code)
{
- return (enum LTO_tags) ((unsigned) code + NUM_TREE_CODES + 1);
+ return (enum LTO_tags) ((unsigned) code + NUM_TREE_CODES + 2);
}
@@ -949,7 +949,7 @@ static inline enum gimple_code
lto_tag_to_gimple_code (enum LTO_tags tag)
{
gcc_assert (lto_tag_is_gimple_code_p (tag));
- return (enum gimple_code) ((unsigned) tag - NUM_TREE_CODES - 1);
+ return (enum gimple_code) ((unsigned) tag - NUM_TREE_CODES - 2);
}
@@ -958,7 +958,7 @@ lto_tag_to_gimple_code (enum LTO_tags tag)
static inline enum LTO_tags
lto_tree_code_to_tag (enum tree_code code)
{
- return (enum LTO_tags) ((unsigned) code + 1);
+ return (enum LTO_tags) ((unsigned) code + 2);
}
@@ -968,7 +968,7 @@ static inline enum tree_code
lto_tag_to_tree_code (enum LTO_tags tag)
{
gcc_assert (lto_tag_is_tree_code_p (tag));
- return (enum tree_code) ((unsigned) tag - 1);
+ return (enum tree_code) ((unsigned) tag - 2);
}
/* Check that tag ACTUAL == EXPECTED. */