diff options
author | Richard Biener <rguenther@suse.de> | 2022-04-27 13:48:49 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-05-05 13:19:40 +0200 |
commit | f1d8a2d9bc3a817309c299147ff85e5091b6693e (patch) | |
tree | 8b2d00e5ce2dddc228aad8c500d501a3fa2ddf73 /gcc/tree.h | |
parent | c2a0d2e6f636c6ad7da44256b6bea7470d895100 (diff) | |
download | gcc-f1d8a2d9bc3a817309c299147ff85e5091b6693e.zip gcc-f1d8a2d9bc3a817309c299147ff85e5091b6693e.tar.gz gcc-f1d8a2d9bc3a817309c299147ff85e5091b6693e.tar.bz2 |
Embed real_value into REAL_CST
The following removes the indirection to real_value from REAL_CST
which doesn't seem to serve any useful purpose. Any sharing can
be achieved by sharing the actual REAL_CST (which is what usually
happens when copying trees) and sharing of real_value amongst
different REAL_CST doesn't happen as far as I can see and would
only lead to further issues like mismatching type and real_value.
2022-04-27 Richard Biener <rguenther@suse.de>
* tree-core.h (tree_real_cst::real_cst_ptr): Remove pointer
to real_value field.
(tree_real_cst::value): Add real_value field.
* tree.h (TREE_REAL_CST_PTR): Adjust.
* tree.cc (build_real): Remove separate allocation.
* tree-streamer-in.cc (unpack_ts_real_cst_value_fields):
Likewise.
gcc/cp/
* module.cc (trees_in::core_vals): Remove separate allocation
for REAL_CST.
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1048,7 +1048,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, #define POLY_INT_CST_COEFF(NODE, I) \ (POLY_INT_CST_CHECK (NODE)->poly_int_cst.coeffs[I]) -#define TREE_REAL_CST_PTR(NODE) (REAL_CST_CHECK (NODE)->real_cst.real_cst_ptr) +#define TREE_REAL_CST_PTR(NODE) (&REAL_CST_CHECK (NODE)->real_cst.value) #define TREE_REAL_CST(NODE) (*TREE_REAL_CST_PTR (NODE)) #define TREE_FIXED_CST_PTR(NODE) \ |