diff options
author | Cary Coutant <ccoutant@google.com> | 2013-07-02 22:18:39 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@gcc.gnu.org> | 2013-07-02 15:18:39 -0700 |
commit | 4b043553715e4e8ef8c38806f05452dfb0d744f0 (patch) | |
tree | 28af569f8b005878fb3cb93240dcca815ccd1fa3 /gcc | |
parent | 45165729bbd9e4d75e3782b99ef887d03feaa2f5 (diff) | |
download | gcc-4b043553715e4e8ef8c38806f05452dfb0d744f0.zip gcc-4b043553715e4e8ef8c38806f05452dfb0d744f0.tar.gz gcc-4b043553715e4e8ef8c38806f05452dfb0d744f0.tar.bz2 |
dwarf2out.c (loc_checksum): Call hash_loc_operands for a deterministic hash.
gcc/
* dwarf2out.c (loc_checksum): Call hash_loc_operands for a
deterministic hash.
(loc_checksum_ordered): Likewise.
(hash_loc_operands): Remove inline keyword.
From-SVN: r200626
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 16 |
2 files changed, 18 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e3b1914..82ca731 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2013-07-02 Cary Coutant <ccoutant@google.com> + + * dwarf2out.c (loc_checksum): Call hash_loc_operands for a + deterministic hash. + (loc_checksum_ordered): Likewise. + (hash_loc_operands): Remove inline keyword. + 2013-07-02 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/57741 diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index f42ad66..c3ae926 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3214,6 +3214,8 @@ static void gen_scheduled_generic_parms_dies (void); static const char *comp_dir_string (void); +static hashval_t hash_loc_operands (dw_loc_descr_ref, hashval_t); + /* enum for tracking thread-local variables whose address is really an offset relative to the TLS pointer, which will need link-time relocation, but will not need relocation by the DWARF consumer. */ @@ -5437,11 +5439,12 @@ static inline void loc_checksum (dw_loc_descr_ref loc, struct md5_ctx *ctx) { int tem; + hashval_t hash = 0; tem = (loc->dtprel << 8) | ((unsigned int) loc->dw_loc_opc); CHECKSUM (tem); - CHECKSUM (loc->dw_loc_oprnd1); - CHECKSUM (loc->dw_loc_oprnd2); + hash = hash_loc_operands (loc, hash); + CHECKSUM (hash); } /* Calculate the checksum of an attribute. */ @@ -5643,9 +5646,12 @@ loc_checksum_ordered (dw_loc_descr_ref loc, struct md5_ctx *ctx) /* Otherwise, just checksum the raw location expression. */ while (loc != NULL) { + hashval_t hash = 0; + + CHECKSUM_ULEB128 (loc->dtprel); CHECKSUM_ULEB128 (loc->dw_loc_opc); - CHECKSUM (loc->dw_loc_oprnd1); - CHECKSUM (loc->dw_loc_oprnd2); + hash = hash_loc_operands (loc, hash); + CHECKSUM (hash); loc = loc->dw_loc_next; } } @@ -23107,7 +23113,7 @@ resolve_addr (dw_die_ref die) /* Iteratively hash operands of LOC opcode. */ -static inline hashval_t +static hashval_t hash_loc_operands (dw_loc_descr_ref loc, hashval_t hash) { dw_val_ref val1 = &loc->dw_loc_oprnd1; |