diff options
author | Jakub Jelinek <jakub@redhat.com> | 2000-11-14 18:37:19 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2000-11-14 18:37:19 +0100 |
commit | bd7cf17efd38b94f26bcf0c309c6b9053c0a21dd (patch) | |
tree | b5c71843b63df50a1d55b0f1bf1e75e0c89fa1d2 /gcc/rtl.h | |
parent | 10e927efe90d9c6bef3ec33a1faeb98cfdde88ee (diff) | |
download | gcc-bd7cf17efd38b94f26bcf0c309c6b9053c0a21dd.zip gcc-bd7cf17efd38b94f26bcf0c309c6b9053c0a21dd.tar.gz gcc-bd7cf17efd38b94f26bcf0c309c6b9053c0a21dd.tar.bz2 |
varasm.c (struct deferred_string): New structure.
* varasm.c (struct deferred_string): New structure.
(const_str_htab): New variable.
(STRHASH): New macro.
(mark_const_str_htab_1, mark_const_str_htab, const_str_htab_hash,
constr_str_htab_eq, const_str_htab_del): New functions.
(output_constant_def): Add DEFER argument, defer string
constants until mark_constant_pool time if requested.
(mark_constant_pool): Walk the insn chain even if const_str_htab is
not empty.
(mark_constants): If a SYMBOL_REF for deferred string is found,
output it and remove from hash table.
(output_addressed_constants): Set DEFER to 0 in call to
output_constant_def.
* rtl.h (STRING_POOL_ADDRESS_P): Define.
(output_constant_def): Adjust prototype.
* expr.c (expand_expr): Set DEFER to 1 in call to output_constant_def.
* gcc.c-torture/execute/20000801-4.c: Make sure the second string is
output.
From-SVN: r37459
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r-- | gcc/rtl.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -168,7 +168,9 @@ typedef struct rtx_def either changing how we compute the frame address or saving and restoring registers in the prologue and epilogue. 1 in a MEM if the MEM refers to a scalar, rather than a member of - an aggregate. */ + an aggregate. + 1 in a SYMBOL_REF if it addresses something in the per-function + constant string pool. */ unsigned frame_related : 1; /* The first element of the operands of this rtx. @@ -904,6 +906,9 @@ extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS]; /* 1 in a SYMBOL_REF if it addresses this function's constants pool. */ #define CONSTANT_POOL_ADDRESS_P(RTX) ((RTX)->unchanging) +/* 1 in a SYMBOL_REF if it addresses this function's string constant pool. */ +#define STRING_POOL_ADDRESS_P(RTX) ((RTX)->frame_related) + /* Flag in a SYMBOL_REF for machine-specific purposes. */ #define SYMBOL_REF_FLAG(RTX) ((RTX)->volatil) @@ -1587,7 +1592,7 @@ extern rtx gen_rtx_MEM PARAMS ((enum machine_mode, rtx)); extern rtx find_next_ref PARAMS ((rtx, rtx)); extern rtx *find_single_use PARAMS ((rtx, rtx, rtx *)); -extern rtx output_constant_def PARAMS ((union tree_node *)); +extern rtx output_constant_def PARAMS ((union tree_node *, int)); extern rtx immed_real_const PARAMS ((union tree_node *)); extern union tree_node *make_tree PARAMS ((union tree_node *, rtx)); |