LCOV - code coverage report
Current view: top level - gcc/rtl-ssa - predicates.h (source / functions) Coverage Total Hit
Test: gcc.info Lines: 100.0 % 2 2
Test Date: 2024-12-28 13:16:48 Functions: - 0 0
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       1                 :             : // RTL SSA predicate classes                                        -*- C++ -*-
       2                 :             : // Copyright (C) 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                 :             : namespace rtl_ssa {
      21                 :             : 
      22                 :             : // Collects predicates that affect a scan over the IR, specifying what
      23                 :             : // (if anything) should be ignored.
      24                 :             : struct ignore_nothing
      25                 :             : {
      26                 :             :   // Return true if the scan should ignore the given definition
      27                 :             :   // and all uses of the definition.
      28                 :             :   bool should_ignore_def (const def_info *) { return false; }
      29                 :             : 
      30                 :             :   // Return true if the scan should ignore the given instruction.
      31                 :             :   bool should_ignore_insn (const insn_info *) { return false; }
      32                 :             : };
      33                 :             : 
      34                 :             : // Predicates that ignore the instruction passed to the constructor
      35                 :             : // (and nothing else).
      36                 :             : class ignore_insn : public ignore_nothing
      37                 :             : {
      38                 :             : public:
      39                 :    46079241 :   ignore_insn (const insn_info *insn) : m_insn (insn) {}
      40                 :   208786728 :   bool should_ignore_insn (const insn_info *insn) { return insn == m_insn; }
      41                 :             : 
      42                 :             : private:
      43                 :             :   const insn_info *m_insn;
      44                 :             : };
      45                 :             : 
      46                 :             : // Predicates that ignore all the instructions being changed by a set
      47                 :             : // of insn_changes.
      48                 :             : class ignore_changing_insns : public ignore_nothing
      49                 :             : {
      50                 :             : public:
      51                 :             :   ignore_changing_insns (array_slice<insn_change *const>);
      52                 :             :   bool should_ignore_insn (const insn_info *);
      53                 :             : 
      54                 :             : private:
      55                 :             :   array_slice<insn_change *const> m_changes;
      56                 :             : };
      57                 :             : 
      58                 :             : }
        

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.