LCOV - code coverage report
Current view: top level - gcc - gimple-ssa-evrp-analyze.h (source / functions) Hit Total Coverage
Test: gcc.info Lines: 12 12 100.0 %
Date: 2020-04-04 11:58:09 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* Support routines for Value Range Propagation (VRP).
       2                 :            :    Copyright (C) 2016-2020 Free Software Foundation, Inc.
       3                 :            : 
       4                 :            : This file is part of GCC.
       5                 :            : 
       6                 :            : GCC is free software; you can redistribute it and/or modify
       7                 :            : it under the terms of the GNU General Public License as published by
       8                 :            : the Free Software Foundation; either version 3, or (at your option)
       9                 :            : any later version.
      10                 :            : 
      11                 :            : GCC is distributed in the hope that it will be useful,
      12                 :            : but WITHOUT ANY WARRANTY; without even the implied warranty of
      13                 :            : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      14                 :            : GNU General Public License for more details.
      15                 :            : 
      16                 :            : You should have received a copy of the GNU General Public License
      17                 :            : along with GCC; see the file COPYING3.  If not see
      18                 :            : <http://www.gnu.org/licenses/>.  */
      19                 :            : 
      20                 :            : #ifndef GCC_GIMPLE_SSA_EVRP_ANALYZE_H
      21                 :            : #define GCC_GIMPLE_SSA_EVRP_ANALYZE_H
      22                 :            : 
      23                 :            : class evrp_range_analyzer
      24                 :            : {
      25                 :            :  public:
      26                 :            :   evrp_range_analyzer (bool update_global_ranges);
      27                 :    3609080 :   ~evrp_range_analyzer (void)
      28                 :    7218158 :   {
      29                 :    3609080 :     delete vr_values;
      30                 :    7218158 :     stack.release ();
      31                 :    3609080 :   }
      32                 :            : 
      33                 :            :   void enter (basic_block);
      34                 :            :   void push_marker (void);
      35                 :            :   void pop_to_marker (void);
      36                 :            :   void leave (basic_block);
      37                 :            :   void record_ranges_from_stmt (gimple *, bool);
      38                 :            : 
      39                 :            :   /* Main interface to retrieve range information.  */
      40                 :   66159620 :   const value_range_equiv *get_value_range (const_tree op)
      41                 :   66159620 :     { return vr_values->get_value_range (op); }
      42                 :            : 
      43                 :            :   /* Record a new unwindable range.  */
      44                 :            :   void push_value_range (tree var, value_range_equiv *vr);
      45                 :            : 
      46                 :            :   /* Dump all the current value ranges.  This is primarily
      47                 :            :      a debugging interface.  */
      48                 :         78 :   void dump_all_value_ranges (FILE *fp)
      49                 :         78 :     { vr_values->dump_all_value_ranges (fp); }
      50                 :            : 
      51                 :            :   /* A bit of a wart.  This should ideally go away.  */
      52                 :    7797100 :   void vrp_visit_cond_stmt (gcond *cond, edge *e)
      53                 :    7797100 :     { return vr_values->vrp_visit_cond_stmt (cond, e); }
      54                 :            : 
      55                 :            :   /* Get the underlying vr_values class instance.  If TRANSFER is
      56                 :            :      true, then we are transferring ownership.  Else we keep ownership.
      57                 :            : 
      58                 :            :      This should be converted to a unique_ptr.  */
      59                 :  191488405 :   class vr_values *get_vr_values (void) { return vr_values; }
      60                 :            : 
      61                 :            :  private:
      62                 :            :   DISABLE_COPY_AND_ASSIGN (evrp_range_analyzer);
      63                 :            :   class vr_values *vr_values;
      64                 :            : 
      65                 :            :   void pop_value_range ();
      66                 :            :   value_range_equiv *try_find_new_range (tree, tree op, tree_code code,
      67                 :            :                                          tree limit);
      68                 :            :   void record_ranges_from_incoming_edge (basic_block);
      69                 :            :   void record_ranges_from_phis (basic_block);
      70                 :            :   void set_ssa_range_info (tree, value_range_equiv *);
      71                 :            : 
      72                 :            :   /* STACK holds the old VR.  */
      73                 :            :   auto_vec<std::pair <tree, value_range_equiv *> > stack;
      74                 :            : 
      75                 :            :   /* True if we are updating global ranges, false otherwise.  */
      76                 :            :   bool m_update_global_ranges;
      77                 :            : };
      78                 :            : 
      79                 :            : #endif /* GCC_GIMPLE_SSA_EVRP_ANALYZE_H */

Generated by: LCOV version 1.0

LCOV profile is generated on x86_64 machine using following configure options: configure --disable-bootstrap --enable-coverage=opt --enable-languages=c,c++,fortran,go,jit,lto --enable-host-shared. GCC test suite is run with the built compiler.