LCOV - code coverage report
Current view: top level - gcc/rtl-ssa - is-a.inl (source / functions) Coverage Total Hit
Test: gcc.info Lines: 88.2 % 17 15
Test Date: 2024-04-20 14:03:02 Functions: - 0 0
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : // is_a<> support for RTL SSA classes                               -*- C++ -*-
       2                 :             : // Copyright (C) 2020-2024 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 it under
       7                 :             : // the terms of the GNU General Public License as published by the Free
       8                 :             : // Software Foundation; either version 3, or (at your option) any later
       9                 :             : // version.
      10                 :             : //
      11                 :             : // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
      12                 :             : // WARRANTY; without even the implied warranty of MERCHANTABILITY or
      13                 :             : // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
      14                 :             : // 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                 :             : template<>
      21                 :             : struct is_a_helper<rtl_ssa::def_info *>
      22                 :             :   : static_is_a_helper<rtl_ssa::def_info *>
      23                 :             : {
      24                 :             :   static inline bool
      25                 :   235065314 :   test (const rtl_ssa::access_info *ref)
      26                 :             :   {
      27                 :   235065314 :     return (ref->kind () == rtl_ssa::access_kind::SET
      28                 :    47593893 :             || ref->kind () == rtl_ssa::access_kind::PHI
      29                 :   134941964 :             || ref->kind () == rtl_ssa::access_kind::CLOBBER);
      30                 :             :   }
      31                 :             : };
      32                 :             : 
      33                 :             : template<>
      34                 :             : struct is_a_helper<rtl_ssa::clobber_info *>
      35                 :             :   : static_is_a_helper<rtl_ssa::clobber_info *>
      36                 :             : {
      37                 :             :   static inline bool
      38                 :   410311670 :   test (const rtl_ssa::access_info *ref)
      39                 :             :   {
      40                 :   376224305 :     return ref->kind () == rtl_ssa::access_kind::CLOBBER;
      41                 :             :   }
      42                 :             : };
      43                 :             : 
      44                 :             : template<>
      45                 :             : struct is_a_helper<rtl_ssa::use_info *>
      46                 :             :   : static_is_a_helper<rtl_ssa::use_info *>
      47                 :             : {
      48                 :             :   static inline bool
      49                 :   467737493 :   test (const rtl_ssa::access_info *ref)
      50                 :             :   {
      51                 :   462279580 :     return ref->kind () == rtl_ssa::access_kind::USE;
      52                 :             :   }
      53                 :             : };
      54                 :             : 
      55                 :             : template<>
      56                 :             : struct is_a_helper<rtl_ssa::set_info *>
      57                 :             :   : static_is_a_helper<rtl_ssa::set_info *>
      58                 :             : {
      59                 :             :   static inline bool
      60                 :   601927537 :   test (const rtl_ssa::access_info *ref)
      61                 :             :   {
      62                 :   601927537 :     return (ref->kind () == rtl_ssa::access_kind::SET
      63                 :   601927537 :             || ref->kind () == rtl_ssa::access_kind::PHI);
      64                 :             :   }
      65                 :             : };
      66                 :             : 
      67                 :             : template<>
      68                 :             : struct is_a_helper<rtl_ssa::phi_info *>
      69                 :             :   : static_is_a_helper<rtl_ssa::phi_info *>
      70                 :             : {
      71                 :             :   static inline bool
      72                 :   299247413 :   test (const rtl_ssa::access_info *ref)
      73                 :             :   {
      74                 :   299247413 :     return ref->kind () == rtl_ssa::access_kind::PHI;
      75                 :             :   }
      76                 :             : };
      77                 :             : 
      78                 :             : template<>
      79                 :             : struct is_a_helper<rtl_ssa::set_node *>
      80                 :             :   : static_is_a_helper<rtl_ssa::set_node *>
      81                 :             : {
      82                 :             :   static inline bool
      83                 :           0 :   test (const rtl_ssa::def_node *node)
      84                 :             :   {
      85                 :           0 :     return node->contains_set ();
      86                 :             :   }
      87                 :             : };
      88                 :             : 
      89                 :             : template<>
      90                 :             : struct is_a_helper<rtl_ssa::clobber_group *>
      91                 :             :   : static_is_a_helper<rtl_ssa::clobber_group *>
      92                 :             : {
      93                 :             :   static inline bool
      94                 :     6947480 :   test (const rtl_ssa::def_node *node)
      95                 :             :   {
      96                 :     6947480 :     return node->contains_clobber ();
      97                 :             :   }
      98                 :             : };
        

Generated by: LCOV version 2.1-beta

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,rust,m2 --enable-host-shared. GCC test suite is run with the built compiler.