aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2021-08-31 23:34:23 +0200
committerThomas Schwinge <thomas@codesourcery.com>2021-11-15 17:56:49 +0100
commitbcebd05720540e257b520737de6e087a328c1f8b (patch)
tree17b24ac57fd7afb6cb428cb9ebce09a341a46703 /gcc/gimple-fold.c
parent6c29c9d6a7d80ece7e08eb546ca4a1ba1430a9b3 (diff)
downloadgcc-bcebd05720540e257b520737de6e087a328c1f8b.zip
gcc-bcebd05720540e257b520737de6e087a328c1f8b.tar.gz
gcc-bcebd05720540e257b520737de6e087a328c1f8b.tar.bz2
Use 'location_hash' for 'seen_locations' in 'gcc/profile.c:branch_prob'
Follow-up to commit 102fcf94e625a2016a65829c73a42bd6c2420376 "Fix GCOV CFG related issues": considering the current 'int_hash <location_t, 0, 2>', per 'libcpp/include/line-map.h': Actual | Value | Meaning -----------+-------------------------------+------------------------------- 0x00000000 | UNKNOWN_LOCATION (gcc/input.h)| Unknown/invalid location. -----------+-------------------------------+------------------------------- 0x00000001 | BUILTINS_LOCATION | The location for declarations | (gcc/input.h) | in "<built-in>" -----------+-------------------------------+------------------------------- 0x00000002 | RESERVED_LOCATION_COUNT | The first location to be | (also | handed out, and the | ordmap[0]->start_location) | first line in ordmap 0 ... this currently uses value '0' ('UNKNOWN_LOCATION') as spare values for 'Empty', and value '2' ('RESERVED_LOCATION_COUNT') as spare values for 'Deleted', which is questionable? What actually does get put into 'seen_locations' is (mostly...) restricted/gated by '!RESERVED_LOCATION_P' (which is true unless 'UNKNOWN_LOCATION' or 'BUILTINS_LOCATION'), thus we may simply use 'location_hash'. gcc/ * profile.c (branch_prob): Use 'location_hash' for 'seen_locations'.
Diffstat (limited to 'gcc/gimple-fold.c')
0 files changed, 0 insertions, 0 deletions