diff options
author | David Malcolm <dmalcolm@redhat.com> | 2020-08-28 07:07:18 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2020-09-09 16:58:13 -0400 |
commit | 6d9ca8c8604e2e7c2403794baf691b260cc71fb9 (patch) | |
tree | 542b2ef585bc007f0cacb7ad6145a0e66659ebe3 /gcc/tree-vectorizer.h | |
parent | 10fc42a8396072912e9d9d940fba25950b3fdfc5 (diff) | |
download | gcc-6d9ca8c8604e2e7c2403794baf691b260cc71fb9.zip gcc-6d9ca8c8604e2e7c2403794baf691b260cc71fb9.tar.gz gcc-6d9ca8c8604e2e7c2403794baf691b260cc71fb9.tar.bz2 |
analyzer: reimplement on_transition in terms of get_state/set_next_state
This patch is further preliminary work towards generalizing sm-malloc.cc
beyond just malloc/free.
Reimplement sm_context's on_transition vfunc in terms of new get_state
and set_next_state vfuncs, so that in followup patches we can implement
richer transitions (e.g. where the states are parametrized by
allocator).
gcc/analyzer/ChangeLog:
* diagnostic-manager.cc
(null_assignment_sm_context::null_assignment_sm_context): Add old_state
and ext_state params, initializing m_old_state and m_ext_state.
(null_assignment_sm_context::on_transition): Split into...
(null_assignment_sm_context::get_state): ...this new vfunc
implementation and...
(null_assignment_sm_context::set_next_state): ...this new vfunc
implementation.
(null_assignment_sm_context::m_old_state): New field.
(null_assignment_sm_context::m_ext_state): New field.
(diagnostic_manager::add_events_for_eedge): Pass in old state and
ext_state when creating sm_ctxt.
* engine.cc (impl_sm_context::on_transition): Split into...
(impl_sm_context::get_state): ...this new vfunc
implementation and...
(impl_sm_context::set_next_state): ...this new vfunc
implementation.
* sm.h (sm_context::get_state): New pure virtual function.
(sm_context::set_next_state): Likewise.
(sm_context::on_transition): Convert from a pure virtual function
to a regular function implemented in terms of get_state and
set_next_state.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions