diff options
author | David Malcolm <dmalcolm@redhat.com> | 2020-10-27 09:52:00 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2020-10-27 09:52:00 -0400 |
commit | bf1b5dae440de8884f66d0dbe9ad539102682e00 (patch) | |
tree | bca50e075ec5cf630a25522b999232bdf83cffa8 /gcc/c/c-parser.c | |
parent | b0702ac5588333e27d7ec43d21d704521f7a05c6 (diff) | |
download | gcc-bf1b5dae440de8884f66d0dbe9ad539102682e00.zip gcc-bf1b5dae440de8884f66d0dbe9ad539102682e00.tar.gz gcc-bf1b5dae440de8884f66d0dbe9ad539102682e00.tar.bz2 |
analyzer: eliminate non-deterministic behavior
This patch is a followup to the previous one, eliminating
non-determinism in the behavior of the analyzer (rather than just in
the logs), by sorting whenever the result previously depended on
pointer values. Tested as per the previous patch.
gcc/analyzer/ChangeLog:
* constraint-manager.cc (svalue_cmp_by_ptr): Delete.
(equiv_class::canonicalize): Use svalue::cmp_ptr_ptr instead.
(equiv_class_cmp): Eliminate pointer comparison.
* diagnostic-manager.cc (dedupe_key::comparator): If they are at
the same location, also compare epath ength and pending_diagnostic
kind.
* engine.cc (readability_comparator): If two path_vars have the
same readability, then impose an arbitrary ordering on them.
(worklist::key_t::cmp): If two points have the same plan ordering,
continue the comparison. Call sm_state_map::cmp rather than
comparing hash values.
* program-state.cc (sm_state_map::entry_t::cmp): New.
(sm_state_map::cmp): New.
* program-state.h (sm_state_map::entry_t::cmp): New decl.
(sm_state_map::elements): New.
(sm_state_map::cmp): New.
Diffstat (limited to 'gcc/c/c-parser.c')
0 files changed, 0 insertions, 0 deletions