On Wed, 2020-01-08 at 04:02 -0500, David Malcolm wrote:
> Needs review.
> 
> Changed in v5:
> - update ChangeLog path
> - updated copyright years to include 2020
> 
> Changed in v4:
> - Remove include of gcc-plugin.h, reworking includes accordingly.
> - Wrap everything in #if ENABLE_ANALYZER
> - Remove /// comment lines
> 
> This patch adds classes for tracking the equivalence classes and
> constraints that hold at a point on an execution path.
> 
> gcc/analyzer/ChangeLog:
>       * constraint-manager.cc: New file.
>       * constraint-manager.h: New file.
So presumably this was better than reusing any existing constraint
solvers.  Your constraint system looks pretty simple, so perhaps trying
to tie in one of the existing solvers would be overkill.

I guess using trees and the folding routines under the hood is OK. 
It's an implementation detail and I guess there's value in that all
that stuff "just works".


> 
> diff --git a/gcc/analyzer/constraint-manager.h 
> b/gcc/analyzer/constraint-manager.h
> new file mode 100644
> index 000000000000..5b71b3dbd1ce
> --- /dev/null
> +++ b/gcc/analyzer/constraint-manager.h
> @@ -0,0 +1,248 @@
> +/* Tracking equivalence classes and constraints at a point on an execution 
> path.
> +   Copyright (C) 2019-2020 Free Software Foundation, Inc.
> +   Contributed by David Malcolm <dmalc...@redhat.com>.
> +
> +This file is part of GCC.
> +
> +GCC is free software; you can redistribute it and/or modify it
> +under the terms of the GNU General Public License as published by
> +the Free Software Foundation; either version 3, or (at your option)
> +any later version.
> +
> +GCC is distributed in the hope that it will be useful, but
> +WITHOUT ANY WARRANTY; without even the implied warranty of
> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> +General Public License for more details.
> +
> +You should have received a copy of the GNU General Public License
> +along with GCC; see the file COPYING3.  If not see
> +<http://www.gnu.org/licenses/>;.  */
> +
> +#ifndef GCC_ANALYZER_CONSTRAINT_MANAGER_H
> +#define GCC_ANALYZER_CONSTRAINT_MANAGER_H
> +
> +#include "analyzer/region-model.h" // for svalue_id
You know the drill :-)

OK with that fixed.

jeff

Reply via email to