LCOV - code coverage report
Current view: top level - gcc/rtl-ssa - blocks.cc (source / functions) Hit Total Coverage
Test: gcc.info Lines: 496 625 79.4 %
Date: 2021-05-08 12:53:43 Functions: 33 50 66.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // Implementation of basic-block-related functions for RTL SSA      -*- C++ -*-
       2                 :            : // Copyright (C) 2020-2021 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                 :            : #define INCLUDE_ALGORITHM
      21                 :            : #define INCLUDE_FUNCTIONAL
      22                 :            : #include "config.h"
      23                 :            : #include "system.h"
      24                 :            : #include "coretypes.h"
      25                 :            : #include "backend.h"
      26                 :            : #include "rtl.h"
      27                 :            : #include "df.h"
      28                 :            : #include "rtl-ssa.h"
      29                 :            : #include "rtl-ssa/internals.h"
      30                 :            : #include "rtl-ssa/internals.inl"
      31                 :            : #include "cfganal.h"
      32                 :            : #include "cfgrtl.h"
      33                 :            : #include "predict.h"
      34                 :            : #include "domwalk.h"
      35                 :            : 
      36                 :            : using namespace rtl_ssa;
      37                 :            : 
      38                 :            : // Prepare to build information for a function in which all register numbers
      39                 :            : // are less than NUM_REGS and all basic block indices are less than
      40                 :            : // NUM_BB_INDICES
      41                 :    1528456 : function_info::build_info::build_info (unsigned int num_regs,
      42                 :    1528456 :                                        unsigned int num_bb_indices)
      43                 :            :   : current_bb (nullptr),
      44                 :            :     current_ebb (nullptr),
      45                 :    1528456 :     last_access (num_regs + 1),
      46                 :            :     ebb_live_in_for_debug (nullptr),
      47                 :            :     potential_phi_regs (num_regs),
      48                 :            :     bb_phis (num_bb_indices),
      49                 :            :     bb_mem_live_out (num_bb_indices),
      50                 :    1528456 :     bb_to_rpo (num_bb_indices)
      51                 :            : {
      52                 :    1528456 :   last_access.safe_grow_cleared (num_regs + 1);
      53                 :            : 
      54                 :    1528456 :   bitmap_clear (potential_phi_regs);
      55                 :            : 
      56                 :            :   // These arrays shouldn't need to be initialized, since we'll always
      57                 :            :   // write to an entry before reading from it.  But poison the contents
      58                 :            :   // when checking, just to make sure we don't accidentally use an
      59                 :            :   // uninitialized value.
      60                 :    1528456 :   bb_phis.quick_grow (num_bb_indices);
      61                 :    1528456 :   bb_mem_live_out.quick_grow (num_bb_indices);
      62                 :    1528456 :   bb_to_rpo.quick_grow (num_bb_indices);
      63                 :    1528456 :   if (flag_checking)
      64                 :            :     {
      65                 :            :       // Can't do this for bb_phis because it has a constructor.
      66                 :    1528436 :       memset (bb_mem_live_out.address (), 0xaf,
      67                 :            :               num_bb_indices * sizeof (bb_mem_live_out[0]));
      68                 :    3056872 :       memset (bb_to_rpo.address (), 0xaf,
      69                 :            :               num_bb_indices * sizeof (bb_to_rpo[0]));
      70                 :            :     }
      71                 :            : 
      72                 :            :   // Start off with an empty set of phi nodes for each block.
      73                 :   22447115 :   for (bb_phi_info &info : bb_phis)
      74                 :   17861747 :     bitmap_initialize (&info.regs, &bitmap_default_obstack);
      75                 :    1528456 : }
      76                 :            : 
      77                 :    1528456 : function_info::build_info::~build_info ()
      78                 :            : {
      79                 :   22447115 :   for (bb_phi_info &info : bb_phis)
      80                 :   17861747 :     bitmap_release (&info.regs);
      81                 :    1528456 : }
      82                 :            : 
      83                 :            : // A dom_walker for populating the basic blocks.
      84                 :    3056912 : class function_info::bb_walker : public dom_walker
      85                 :            : {
      86                 :            : public:
      87                 :            :   bb_walker (function_info *, build_info &);
      88                 :            :   virtual edge before_dom_children (basic_block);
      89                 :            :   virtual void after_dom_children (basic_block);
      90                 :            : 
      91                 :            : private:
      92                 :            :   // Information about the function we're building.
      93                 :            :   function_info *m_function;
      94                 :            :   build_info &m_bi;
      95                 :            : 
      96                 :            :   // We should treat the exit block as being the last child of this one.
      97                 :            :   // See the comment in the constructor for more information.
      98                 :            :   basic_block m_exit_block_dominator;
      99                 :            : };
     100                 :            : 
     101                 :            : // Prepare to walk the blocks in FUNCTION using BI.
     102                 :    1528456 : function_info::bb_walker::bb_walker (function_info *function, build_info &bi)
     103                 :            :   : dom_walker (CDI_DOMINATORS, ALL_BLOCKS, bi.bb_to_rpo.address ()),
     104                 :            :     m_function (function),
     105                 :            :     m_bi (bi),
     106                 :    3056912 :     m_exit_block_dominator (nullptr)
     107                 :            : {
     108                 :            :   // ??? There is no dominance information associated with the exit block,
     109                 :            :   // so work out its immediate dominator using predecessor blocks.  We then
     110                 :            :   // walk the exit block just before popping its immediate dominator.
     111                 :    1528456 :   edge e;
     112                 :    1528456 :   edge_iterator ei;
     113                 :    3101136 :   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR_FOR_FN (m_function->m_fn)->preds)
     114                 :    1572680 :     if (m_exit_block_dominator)
     115                 :      83966 :       m_exit_block_dominator
     116                 :      83966 :         = nearest_common_dominator (CDI_DOMINATORS,
     117                 :            :                                     m_exit_block_dominator, e->src);
     118                 :            :     else
     119                 :    1488714 :       m_exit_block_dominator = e->src;
     120                 :            : 
     121                 :            :   // If the exit block is unreachable, process it last.
     122                 :    1528456 :   if (!m_exit_block_dominator)
     123                 :      39742 :     m_exit_block_dominator = ENTRY_BLOCK_PTR_FOR_FN (m_function->m_fn);
     124                 :    1528456 : }
     125                 :            : 
     126                 :            : edge
     127                 :   17146600 : function_info::bb_walker::before_dom_children (basic_block bb)
     128                 :            : {
     129                 :   17146600 :   m_function->start_block (m_bi, m_function->bb (bb));
     130                 :   17146600 :   return nullptr;
     131                 :            : }
     132                 :            : 
     133                 :            : void
     134                 :   17146600 : function_info::bb_walker::after_dom_children (basic_block bb)
     135                 :            : {
     136                 :            :   // See the comment in the constructor for details.
     137                 :   17146600 :   if (bb == m_exit_block_dominator)
     138                 :            :     {
     139                 :    1528456 :       before_dom_children (EXIT_BLOCK_PTR_FOR_FN (m_function->m_fn));
     140                 :    1528456 :       after_dom_children (EXIT_BLOCK_PTR_FOR_FN (m_function->m_fn));
     141                 :            :     }
     142                 :   17146600 :   m_function->end_block (m_bi, m_function->bb (bb));
     143                 :   17146600 : }
     144                 :            : 
     145                 :            : // See the comment above the declaration.
     146                 :            : void
     147                 :          0 : bb_info::print_identifier (pretty_printer *pp) const
     148                 :            : {
     149                 :          0 :   char tmp[3 * sizeof (index ()) + 3];
     150                 :          0 :   snprintf (tmp, sizeof (tmp), "bb%d", index ());
     151                 :          0 :   pp_string (pp, tmp);
     152                 :          0 :   if (ebb_info *ebb = this->ebb ())
     153                 :            :     {
     154                 :          0 :       pp_space (pp);
     155                 :          0 :       pp_left_bracket (pp);
     156                 :          0 :       ebb->print_identifier (pp);
     157                 :          0 :       pp_right_bracket (pp);
     158                 :            :     }
     159                 :          0 : }
     160                 :            : 
     161                 :            : // See the comment above the declaration.
     162                 :            : void
     163                 :          0 : bb_info::print_full (pretty_printer *pp) const
     164                 :            : {
     165                 :          0 :   pp_string (pp, "basic block ");
     166                 :          0 :   print_identifier (pp);
     167                 :          0 :   pp_colon (pp);
     168                 :            : 
     169                 :          0 :   auto print_insn = [pp](const char *header, const insn_info *insn)
     170                 :            :     {
     171                 :          0 :       pp_newline_and_indent (pp, 2);
     172                 :          0 :       pp_string (pp, header);
     173                 :          0 :       pp_newline_and_indent (pp, 2);
     174                 :          0 :       if (insn)
     175                 :          0 :         pp_insn (pp, insn);
     176                 :            :       else
     177                 :          0 :         pp_string (pp, "<uninitialized>");
     178                 :          0 :       pp_indentation (pp) -= 4;
     179                 :          0 :     };
     180                 :            : 
     181                 :          0 :   print_insn ("head:", head_insn ());
     182                 :            : 
     183                 :          0 :   pp_newline (pp);
     184                 :          0 :   pp_newline_and_indent (pp, 2);
     185                 :          0 :   pp_string (pp, "contents:");
     186                 :          0 :   if (!head_insn ())
     187                 :            :     {
     188                 :          0 :       pp_newline_and_indent (pp, 2);
     189                 :          0 :       pp_string (pp, "<uninitialized>");
     190                 :          0 :       pp_indentation (pp) -= 2;
     191                 :            :     }
     192                 :          0 :   else if (auto insns = real_insns ())
     193                 :            :     {
     194                 :            :       bool is_first = true;
     195                 :          0 :       for (const insn_info *insn : insns)
     196                 :            :         {
     197                 :          0 :           if (is_first)
     198                 :            :             is_first = false;
     199                 :            :           else
     200                 :          0 :             pp_newline (pp);
     201                 :          0 :           pp_newline_and_indent (pp, 2);
     202                 :          0 :           pp_insn (pp, insn);
     203                 :          0 :           pp_indentation (pp) -= 2;
     204                 :            :         }
     205                 :            :     }
     206                 :            :   else
     207                 :            :     {
     208                 :          0 :       pp_newline_and_indent (pp, 2);
     209                 :          0 :       pp_string (pp, "none");
     210                 :          0 :       pp_indentation (pp) -= 2;
     211                 :            :     }
     212                 :          0 :   pp_indentation (pp) -= 2;
     213                 :            : 
     214                 :          0 :   pp_newline (pp);
     215                 :          0 :   print_insn ("end:", end_insn ());
     216                 :          0 : }
     217                 :            : 
     218                 :            : // See the comment above the declaration.
     219                 :            : void
     220                 :          0 : ebb_call_clobbers_info::print_summary (pretty_printer *pp) const
     221                 :            : {
     222                 :          0 :   pp_string (pp, "call clobbers for ABI ");
     223                 :          0 :   if (m_abi)
     224                 :          0 :     pp_decimal_int (pp, m_abi->id ());
     225                 :            :   else
     226                 :          0 :     pp_string (pp, "<null>");
     227                 :          0 : }
     228                 :            : 
     229                 :            : // See the comment above the declaration.
     230                 :            : void
     231                 :          0 : ebb_call_clobbers_info::print_full (pretty_printer *pp) const
     232                 :            : {
     233                 :          0 :   print_summary (pp);
     234                 :          0 :   pp_colon (pp);
     235                 :          0 :   pp_newline_and_indent (pp, 2);
     236                 :          0 :   auto print_node = [](pretty_printer *pp,
     237                 :            :                        const insn_call_clobbers_note *note)
     238                 :            :     {
     239                 :          0 :       if (insn_info *insn = note->insn ())
     240                 :          0 :         insn->print_identifier_and_location (pp);
     241                 :            :       else
     242                 :          0 :         pp_string (pp, "<null>");
     243                 :          0 :     };
     244                 :          0 :   print (pp, root (), print_node);
     245                 :          0 :   pp_indentation (pp) -= 2;
     246                 :          0 : }
     247                 :            : 
     248                 :            : // See the comment above the declaration.
     249                 :            : void
     250                 :          0 : ebb_info::print_identifier (pretty_printer *pp) const
     251                 :            : {
     252                 :            :   // first_bb is populated by the constructor and so should always
     253                 :            :   // be nonnull.
     254                 :          0 :   auto index = first_bb ()->index ();
     255                 :          0 :   char tmp[3 * sizeof (index) + 4];
     256                 :          0 :   snprintf (tmp, sizeof (tmp), "ebb%d", index);
     257                 :          0 :   pp_string (pp, tmp);
     258                 :          0 : }
     259                 :            : 
     260                 :            : // See the comment above the declaration.
     261                 :            : void
     262                 :          0 : ebb_info::print_full (pretty_printer *pp) const
     263                 :            : {
     264                 :          0 :   pp_string (pp, "extended basic block ");
     265                 :          0 :   print_identifier (pp);
     266                 :          0 :   pp_colon (pp);
     267                 :            : 
     268                 :          0 :   pp_newline_and_indent (pp, 2);
     269                 :          0 :   if (insn_info *phi_insn = this->phi_insn ())
     270                 :            :     {
     271                 :          0 :       phi_insn->print_identifier_and_location (pp);
     272                 :          0 :       pp_colon (pp);
     273                 :          0 :       if (auto phis = this->phis ())
     274                 :            :         {
     275                 :            :           bool is_first = true;
     276                 :          0 :           for (const phi_info *phi : phis)
     277                 :            :             {
     278                 :          0 :               if (is_first)
     279                 :            :                 is_first = false;
     280                 :            :               else
     281                 :          0 :                 pp_newline (pp);
     282                 :          0 :               pp_newline_and_indent (pp, 2);
     283                 :          0 :               pp_access (pp, phi, PP_ACCESS_SETTER);
     284                 :          0 :               pp_indentation (pp) -= 2;
     285                 :            :             }
     286                 :            :         }
     287                 :            :       else
     288                 :            :         {
     289                 :          0 :           pp_newline_and_indent (pp, 2);
     290                 :          0 :           pp_string (pp, "no phi nodes");
     291                 :          0 :           pp_indentation (pp) -= 2;
     292                 :            :         }
     293                 :            :     }
     294                 :            :   else
     295                 :          0 :     pp_string (pp, "no phi insn");
     296                 :          0 :   pp_indentation (pp) -= 2;
     297                 :            : 
     298                 :          0 :   for (const bb_info *bb : bbs ())
     299                 :            :     {
     300                 :          0 :       pp_newline (pp);
     301                 :          0 :       pp_newline_and_indent (pp, 2);
     302                 :          0 :       pp_bb (pp, bb);
     303                 :          0 :       pp_indentation (pp) -= 2;
     304                 :            :     }
     305                 :            : 
     306                 :          0 :   for (ebb_call_clobbers_info *ecc : call_clobbers ())
     307                 :            :     {
     308                 :          0 :       pp_newline (pp);
     309                 :          0 :       pp_newline_and_indent (pp, 2);
     310                 :          0 :       pp_ebb_call_clobbers (pp, ecc);
     311                 :          0 :       pp_indentation (pp) -= 2;
     312                 :            :     }
     313                 :          0 : }
     314                 :            : 
     315                 :            : // Add a dummy use to mark that DEF is live out of BB's EBB at the end of BB.
     316                 :            : void
     317                 :   27025054 : function_info::add_live_out_use (bb_info *bb, set_info *def)
     318                 :            : {
     319                 :            :   // There is nothing to do if DEF is an artificial definition at the end
     320                 :            :   // of BB.  In that case the definitino is rooted at the end of the block
     321                 :            :   // and we wouldn't gain anything by inserting a use immediately after it.
     322                 :            :   // If we did want to insert a use, we'd need to associate it with a new
     323                 :            :   // instruction that comes after bb->end_insn ().
     324                 :   27025054 :   if (def->insn () == bb->end_insn ())
     325                 :            :     return;
     326                 :            : 
     327                 :            :   // If the end of the block already has an artificial use, that use
     328                 :            :   // acts to make DEF live at the appropriate point.
     329                 :   19061258 :   use_info *use = def->last_nondebug_insn_use ();
     330                 :   11128348 :   if (use && use->insn () == bb->end_insn ())
     331                 :            :     return;
     332                 :            : 
     333                 :            :   // Currently there is no need to maintain a backward link from the end
     334                 :            :   // instruction to the list of live-out uses.  Such a list would be
     335                 :            :   // expensive to update if it was represented using the usual insn_info
     336                 :            :   // access arrays.
     337                 :   16503157 :   use = allocate<use_info> (bb->end_insn (), def->resource (), def);
     338                 :   16503157 :   use->set_is_live_out_use (true);
     339                 :   16503157 :   add_use (use);
     340                 :            : }
     341                 :            : 
     342                 :            : // Return true if all nondebug uses of DEF are live-out uses.
     343                 :            : static bool
     344                 :    3765401 : all_uses_are_live_out_uses (set_info *def)
     345                 :            : {
     346                 :    3774868 :   for (use_info *use : def->all_uses ())
     347                 :    4732156 :     if (!use->is_in_debug_insn () && !use->is_live_out_use ())
     348                 :    3765401 :       return false;
     349                 :            :   return true;
     350                 :            : }
     351                 :            : 
     352                 :            : // SET, if nonnull, is a definition of something that is live out from BB.
     353                 :            : // Return the live-out value itself.
     354                 :            : set_info *
     355                 :   54603033 : function_info::live_out_value (bb_info *bb, set_info *set)
     356                 :            : {
     357                 :            :   // Degenerate phis only exist to provide a definition for uses in the
     358                 :            :   // same EBB.  The live-out value is the same as the live-in value.
     359                 :   54603033 :   if (auto *phi = safe_dyn_cast<phi_info *> (set))
     360                 :   13145222 :     if (phi->is_degenerate ())
     361                 :            :       {
     362                 :    5763735 :         set = phi->input_value (0);
     363                 :            : 
     364                 :            :         // Remove the phi if it turned out to be useless.  This is
     365                 :            :         // mainly useful for memory, because we don't know ahead of time
     366                 :            :         // whether a block will use memory or not.
     367                 :    5763735 :         if (bb == bb->ebb ()->last_bb () && all_uses_are_live_out_uses (phi))
     368                 :    1408790 :           replace_phi (phi, set);
     369                 :            :       }
     370                 :            : 
     371                 :   54603033 :   return set;
     372                 :            : }
     373                 :            : 
     374                 :            : // Add PHI to EBB and enter it into the function's hash table.
     375                 :            : void
     376                 :   19890406 : function_info::append_phi (ebb_info *ebb, phi_info *phi)
     377                 :            : {
     378                 :   19890406 :   phi_info *first_phi = ebb->first_phi ();
     379                 :   19890406 :   if (first_phi)
     380                 :   10635933 :     first_phi->set_prev_phi (phi);
     381                 :   19890406 :   phi->set_next_phi (first_phi);
     382                 :   19890406 :   ebb->set_first_phi (phi);
     383                 :   19890406 :   add_def (phi);
     384                 :   19890406 : }
     385                 :            : 
     386                 :            : // Remove PHI from its current position in the SSA graph.
     387                 :            : void
     388                 :    2452094 : function_info::remove_phi (phi_info *phi)
     389                 :            : {
     390                 :    2452094 :   phi_info *next = phi->next_phi ();
     391                 :    2452094 :   phi_info *prev = phi->prev_phi ();
     392                 :            : 
     393                 :    2452094 :   if (next)
     394                 :     346056 :     next->set_prev_phi (prev);
     395                 :            : 
     396                 :    2452094 :   if (prev)
     397                 :    1105061 :     prev->set_next_phi (next);
     398                 :            :   else
     399                 :    1347033 :     phi->ebb ()->set_first_phi (next);
     400                 :            : 
     401                 :    2452094 :   remove_def (phi);
     402                 :    2452094 :   phi->clear_phi_links ();
     403                 :    2452094 : }
     404                 :            : 
     405                 :            : // Remove PHI from the SSA graph and free its memory.
     406                 :            : void
     407                 :    2452094 : function_info::delete_phi (phi_info *phi)
     408                 :            : {
     409                 :    2452094 :   gcc_assert (!phi->has_any_uses ());
     410                 :            : 
     411                 :            :   // Remove the inputs to the phi.
     412                 :    7511379 :   for (use_info *input : phi->inputs ())
     413                 :    2607191 :     remove_use (input);
     414                 :            : 
     415                 :    2452094 :   remove_phi (phi);
     416                 :            : 
     417                 :    2452094 :   phi->set_next_phi (m_free_phis);
     418                 :    2452094 :   m_free_phis = phi;
     419                 :    2452094 : }
     420                 :            : 
     421                 :            : // If possible, remove PHI and replace all uses with NEW_VALUE.
     422                 :            : void
     423                 :   13101355 : function_info::replace_phi (phi_info *phi, set_info *new_value)
     424                 :            : {
     425                 :   13784261 :   auto update_use = [&](use_info *use)
     426                 :            :     {
     427                 :     682906 :       remove_use (use);
     428                 :     682906 :       use->set_def (new_value);
     429                 :            :       add_use (use);
     430                 :   13784261 :     };
     431                 :            : 
     432                 :   13101355 :   if (new_value)
     433                 :   26201814 :     for (use_info *use : phi->nondebug_insn_uses ())
     434                 :   10649261 :       if (!use->is_live_out_use ())
     435                 :            :         {
     436                 :            :           // We need to keep the phi around for its local uses.
     437                 :            :           // Turn it into a degenerate phi, if it isn't already.
     438                 :   10649261 :           use_info *use = phi->input_use (0);
     439                 :   10649261 :           if (use->def () != new_value)
     440                 :     109459 :             update_use (use);
     441                 :            : 
     442                 :   10649261 :           if (phi->is_degenerate ())
     443                 :   10649261 :             return;
     444                 :            : 
     445                 :     169539 :           phi->make_degenerate (use);
     446                 :            : 
     447                 :            :           // Redirect all phi users to NEW_VALUE.
     448                 :   11218422 :           while (use_info *phi_use = phi->last_phi_use ())
     449                 :     399622 :             update_use (phi_use);
     450                 :            : 
     451                 :            :           return;
     452                 :            :         }
     453                 :            : 
     454                 :            :   // Replace the uses.  We can discard uses that only existed for the
     455                 :            :   // sake of marking live-out values, since the resource is now transparent
     456                 :            :   // in the phi's EBB.
     457                 :    2626672 :   while (use_info *use = phi->last_use ())
     458                 :     174578 :     if (use->is_live_out_use ())
     459                 :        753 :       remove_use (use);
     460                 :            :     else
     461                 :     173825 :       update_use (use);
     462                 :            : 
     463                 :    2452094 :   delete_phi (phi);
     464                 :            : }
     465                 :            : 
     466                 :            : // Create and return a phi node for EBB.  RESOURCE is the resource that
     467                 :            : // the phi node sets (and thus that all the inputs set too).  NUM_INPUTS
     468                 :            : // is the number of inputs, which is 1 for a degenerate phi.  INPUTS[I]
     469                 :            : // is a set_info that gives the value of input I, or null if the value
     470                 :            : // is either unknown or uninitialized.  If NUM_INPUTS > 1, this array
     471                 :            : // is allocated on the main obstack and can be reused for the use array.
     472                 :            : //
     473                 :            : // Add the created phi node to its basic block and enter it into the
     474                 :            : // function's hash table.
     475                 :            : phi_info *
     476                 :   19890406 : function_info::create_phi (ebb_info *ebb, resource_info resource,
     477                 :            :                            access_info **inputs, unsigned int num_inputs)
     478                 :            : {
     479                 :   19890406 :   phi_info *phi = m_free_phis;
     480                 :   19890406 :   if (phi)
     481                 :            :     {
     482                 :    1404838 :       m_free_phis = phi->next_phi ();
     483                 :    1404838 :       *phi = phi_info (ebb->phi_insn (), resource, phi->uid ());
     484                 :            :     }
     485                 :            :   else
     486                 :            :     {
     487                 :   18485568 :       phi = allocate<phi_info> (ebb->phi_insn (), resource, m_next_phi_uid);
     488                 :   18485568 :       m_next_phi_uid += 1;
     489                 :            :     }
     490                 :            : 
     491                 :            :   // Convert the array of set_infos into an array of use_infos.  Also work
     492                 :            :   // out what mode the phi should have.
     493                 :   19890406 :   machine_mode new_mode = resource.mode;
     494                 :   51484095 :   for (unsigned int i = 0; i < num_inputs; ++i)
     495                 :            :     {
     496                 :   31593689 :       auto *input = safe_as_a<set_info *> (inputs[i]);
     497                 :   31593689 :       auto *use = allocate<use_info> (phi, resource, input);
     498                 :   31593689 :       add_use (use);
     499                 :   31593689 :       inputs[i] = use;
     500                 :   31593689 :       if (input)
     501                 :   36385842 :         new_mode = combine_modes (new_mode, input->mode ());
     502                 :            :     }
     503                 :            : 
     504                 :   19890406 :   phi->set_inputs (use_array (inputs, num_inputs));
     505                 :   19890406 :   phi->set_mode (new_mode);
     506                 :            : 
     507                 :   19890406 :   append_phi (ebb, phi);
     508                 :            : 
     509                 :   19890406 :   return phi;
     510                 :            : }
     511                 :            : 
     512                 :            : // Create and return a degenerate phi for EBB whose input comes from DEF.
     513                 :            : // This is used in cases where DEF is known to be available on entry to
     514                 :            : // EBB but was not previously used within it.  If DEF is for a register,
     515                 :            : // there are two cases:
     516                 :            : //
     517                 :            : // (1) DEF was already live on entry to EBB but was previously transparent
     518                 :            : //     within it.
     519                 :            : //
     520                 :            : // (2) DEF was not previously live on entry to EBB and is being made live
     521                 :            : //     by this update.
     522                 :            : //
     523                 :            : // At the moment, this function only handles the case in which EBB has a
     524                 :            : // single predecessor block and DEF is defined in that block's EBB.
     525                 :            : phi_info *
     526                 :        952 : function_info::create_degenerate_phi (ebb_info *ebb, set_info *def)
     527                 :            : {
     528                 :        952 :   access_info *input = def;
     529                 :        952 :   phi_info *phi = create_phi (ebb, def->resource (), &input, 1);
     530                 :        952 :   if (def->is_reg ())
     531                 :            :     {
     532                 :        952 :       unsigned int regno = def->regno ();
     533                 :            : 
     534                 :            :       // Find the single predecessor mentioned above.
     535                 :        952 :       basic_block pred_cfg_bb = single_pred (ebb->first_bb ()->cfg_bb ());
     536                 :        952 :       bb_info *pred_bb = this->bb (pred_cfg_bb);
     537                 :            : 
     538                 :       1904 :       if (!bitmap_set_bit (DF_LR_IN (ebb->first_bb ()->cfg_bb ()), regno))
     539                 :            :         {
     540                 :            :           // The register was not previously live on entry to EBB and
     541                 :            :           // might not have been live on exit from PRED_BB either.
     542                 :       1280 :           if (bitmap_set_bit (DF_LR_OUT (pred_cfg_bb), regno))
     543                 :          0 :             add_live_out_use (pred_bb, def);
     544                 :            :         }
     545                 :            :       else
     546                 :            :         {
     547                 :            :           // The register was previously live in to EBB.  Add live-out uses
     548                 :            :           // at the appropriate points.
     549                 :        312 :           insn_info *next_insn = nullptr;
     550                 :        312 :           if (def_info *next_def = phi->next_def ())
     551                 :        122 :             next_insn = next_def->insn ();
     552                 :        312 :           for (bb_info *bb : ebb->bbs ())
     553                 :            :             {
     554                 :        122 :               if ((next_insn && *next_insn <= *bb->end_insn ())
     555                 :        728 :                   || !bitmap_bit_p (DF_LR_OUT (bb->cfg_bb ()), regno))
     556                 :            :                 break;
     557                 :          0 :               add_live_out_use (bb, def);
     558                 :            :             }
     559                 :            :         }
     560                 :            :     }
     561                 :        952 :   return phi;
     562                 :            : }
     563                 :            : 
     564                 :            : // Create a bb_info for CFG_BB, given that no such structure currently exists.
     565                 :            : bb_info *
     566                 :   17146600 : function_info::create_bb_info (basic_block cfg_bb)
     567                 :            : {
     568                 :   17146600 :   bb_info *bb = allocate<bb_info> (cfg_bb);
     569                 :   17146600 :   gcc_checking_assert (!m_bbs[cfg_bb->index]);
     570                 :   17146600 :   m_bbs[cfg_bb->index] = bb;
     571                 :   17146600 :   return bb;
     572                 :            : }
     573                 :            : 
     574                 :            : // Add BB to the end of the list of blocks.
     575                 :            : void
     576                 :   17146600 : function_info::append_bb (bb_info *bb)
     577                 :            : {
     578                 :   17146600 :   if (m_last_bb)
     579                 :   15618144 :     m_last_bb->set_next_bb (bb);
     580                 :            :   else
     581                 :    1528456 :     m_first_bb = bb;
     582                 :   17146600 :   bb->set_prev_bb (m_last_bb);
     583                 :   17146600 :   m_last_bb = bb;
     584                 :   17146600 : }
     585                 :            : 
     586                 :            : // Calculate BI.potential_phi_regs and BI.potential_phi_regs_for_debug.
     587                 :            : void
     588                 :    1528456 : function_info::calculate_potential_phi_regs (build_info &bi)
     589                 :            : {
     590                 :    1528456 :   auto *lr_info = DF_LR_BB_INFO (ENTRY_BLOCK_PTR_FOR_FN (m_fn));
     591                 :    1528456 :   bool is_debug = MAY_HAVE_DEBUG_INSNS;
     592                 :  179915975 :   for (unsigned int regno = 0; regno < m_num_regs; ++regno)
     593                 :  178387519 :     if (regno >= DF_REG_SIZE (DF)
     594                 :            :         // Exclude registers that have a single definition that dominates
     595                 :            :         // all uses.  If the definition does not dominate all uses,
     596                 :            :         // the register will be exposed upwards to the entry block but
     597                 :            :         // will not be defined by the entry block.
     598                 :  178371476 :         || DF_REG_DEF_COUNT (regno) > 1
     599                 :  307009958 :         || (!bitmap_bit_p (&lr_info->def, regno)
     600                 :  115363595 :             && bitmap_bit_p (&lr_info->out, regno)))
     601                 :            :       {
     602                 :   49891074 :         bitmap_set_bit (bi.potential_phi_regs, regno);
     603                 :   49891074 :         if (is_debug)
     604                 :   32708311 :           bitmap_set_bit (bi.potential_phi_regs_for_debug, regno);
     605                 :            :       }
     606                 :    1528456 : }
     607                 :            : 
     608                 :            : // Called while building SSA form using BI.  Decide where phi nodes
     609                 :            : // should be placed for each register and initialize BI.bb_phis accordingly.
     610                 :            : void
     611                 :    1528456 : function_info::place_phis (build_info &bi)
     612                 :            : {
     613                 :    1528456 :   unsigned int num_bb_indices = last_basic_block_for_fn (m_fn);
     614                 :            : 
     615                 :            :   // Calculate dominance frontiers.
     616                 :    1528456 :   auto_vec<bitmap_head> frontiers;
     617                 :    1528456 :   frontiers.safe_grow (num_bb_indices);
     618                 :   19390203 :   for (unsigned int i = 0; i < num_bb_indices; ++i)
     619                 :   17861747 :     bitmap_initialize (&frontiers[i], &bitmap_default_obstack);
     620                 :    3056912 :   compute_dominance_frontiers (frontiers.address ());
     621                 :            : 
     622                 :            :   // In extreme cases, the number of live-in registers can be much
     623                 :            :   // greater than the number of phi nodes needed in a block (see PR98863).
     624                 :            :   // Try to reduce the number of operations involving live-in sets by using
     625                 :            :   // PENDING as a staging area: registers in PENDING need phi nodes if
     626                 :            :   // they are live on entry to the corresponding block, but do not need
     627                 :            :   // phi nodes otherwise.
     628                 :    3056912 :   auto_vec<bitmap_head> unfiltered;
     629                 :    1528456 :   unfiltered.safe_grow (num_bb_indices);
     630                 :   19390203 :   for (unsigned int i = 0; i < num_bb_indices; ++i)
     631                 :   17861747 :     bitmap_initialize (&unfiltered[i], &bitmap_default_obstack);
     632                 :            : 
     633                 :            :   // If block B1 defines R and if B2 is in the dominance frontier of B1,
     634                 :            :   // queue a possible phi node for R in B2.
     635                 :    3056912 :   auto_bitmap worklist;
     636                 :   19390203 :   for (unsigned int b1 = 0; b1 < num_bb_indices; ++b1)
     637                 :            :     {
     638                 :            :       // Only access DF information for blocks that are known to exist.
     639                 :   17861747 :       if (bitmap_empty_p (&frontiers[b1]))
     640                 :    7953785 :         continue;
     641                 :            : 
     642                 :    9907962 :       bitmap b1_def = &DF_LR_BB_INFO (BASIC_BLOCK_FOR_FN (m_fn, b1))->def;
     643                 :    9907962 :       bitmap_iterator bmi;
     644                 :    9907962 :       unsigned int b2;
     645                 :   24387553 :       EXECUTE_IF_SET_IN_BITMAP (&frontiers[b1], 0, b2, bmi)
     646                 :   14479591 :         if (bitmap_ior_into (&unfiltered[b2], b1_def)
     647                 :   14479591 :             && !bitmap_empty_p (&frontiers[b2]))
     648                 :            :           // Propagate the (potential) new phi node definitions in B2.
     649                 :    6762252 :           bitmap_set_bit (worklist, b2);
     650                 :            :     }
     651                 :            : 
     652                 :    4037387 :   while (!bitmap_empty_p (worklist))
     653                 :            :     {
     654                 :    2508931 :       unsigned int b1 = bitmap_first_set_bit (worklist);
     655                 :    2508931 :       bitmap_clear_bit (worklist, b1);
     656                 :            : 
     657                 :            :       // Restrict the phi nodes to registers that are live on entry to
     658                 :            :       // the block.
     659                 :    2508931 :       bitmap b1_in = DF_LR_IN (BASIC_BLOCK_FOR_FN (m_fn, b1));
     660                 :    2508931 :       bitmap b1_phis = &bi.bb_phis[b1].regs;
     661                 :    2508931 :       if (!bitmap_ior_and_into (b1_phis, &unfiltered[b1], b1_in))
     662                 :     822448 :         continue;
     663                 :            : 
     664                 :            :       // If block B1 has a phi node for R and if B2 is in the dominance
     665                 :            :       // frontier of B1, queue a possible phi node for R in B2.
     666                 :    1686483 :       bitmap_iterator bmi;
     667                 :    1686483 :       unsigned int b2;
     668                 :    4641593 :       EXECUTE_IF_SET_IN_BITMAP (&frontiers[b1], 0, b2, bmi)
     669                 :    2955110 :         if (bitmap_ior_into (&unfiltered[b2], b1_phis)
     670                 :    2955110 :             && !bitmap_empty_p (&frontiers[b2]))
     671                 :     414379 :           bitmap_set_bit (worklist, b2);
     672                 :            :     }
     673                 :            : 
     674                 :    1528456 :   basic_block cfg_bb;
     675                 :   18675056 :   FOR_ALL_BB_FN (cfg_bb, m_fn)
     676                 :            :     {
     677                 :            :       // Calculate the set of phi nodes for blocks that don't have any
     678                 :            :       // dominance frontiers.  We only need to do this once per block.
     679                 :   17146600 :       unsigned int i = cfg_bb->index;
     680                 :   17146600 :       bb_phi_info &phis = bi.bb_phis[i];
     681                 :   17146600 :       if (bitmap_empty_p (&frontiers[i]))
     682                 :   14477276 :         bitmap_and (&phis.regs, &unfiltered[i], DF_LR_IN (cfg_bb));
     683                 :            : 
     684                 :            :       // Create an array that contains all phi inputs for this block.
     685                 :            :       // See the comment above the member variables for more information.
     686                 :   17146600 :       phis.num_phis = bitmap_count_bits (&phis.regs);
     687                 :   17146600 :       phis.num_preds = EDGE_COUNT (cfg_bb->preds);
     688                 :   17146600 :       unsigned int num_inputs = phis.num_phis * phis.num_preds;
     689                 :   17146600 :       if (num_inputs != 0)
     690                 :            :         {
     691                 :    2154307 :           phis.inputs = XOBNEWVEC (&m_temp_obstack, set_info *, num_inputs);
     692                 :    2154307 :           memset (phis.inputs, 0, num_inputs * sizeof (phis.inputs[0]));
     693                 :            :         }
     694                 :            :     }
     695                 :            : 
     696                 :            :   // Free the temporary bitmaps.
     697                 :   19390203 :   for (unsigned int i = 0; i < num_bb_indices; ++i)
     698                 :            :     {
     699                 :   17861747 :       bitmap_release (&frontiers[i]);
     700                 :   17861747 :       bitmap_release (&unfiltered[i]);
     701                 :            :     }
     702                 :    1528456 : }
     703                 :            : 
     704                 :            : // Called while building SSA form using BI, with BI.current_bb being
     705                 :            : // the entry block.
     706                 :            : //
     707                 :            : // Create the entry block instructions and their definitions.  The only
     708                 :            : // useful instruction is the end instruction, which carries definitions
     709                 :            : // for the values that are live on entry to the function.  However, it
     710                 :            : // seems simpler to create a head instruction too, rather than force all
     711                 :            : // users of the block information to treat the entry block as a special case.
     712                 :            : void
     713                 :    1528456 : function_info::add_entry_block_defs (build_info &bi)
     714                 :            : {
     715                 :    1528456 :   bb_info *bb = bi.current_bb;
     716                 :    1528456 :   basic_block cfg_bb = bi.current_bb->cfg_bb ();
     717                 :    1528456 :   auto *lr_info = DF_LR_BB_INFO (cfg_bb);
     718                 :            : 
     719                 :    1528456 :   bb->set_head_insn (append_artificial_insn (bb));
     720                 :    1528456 :   insn_info *insn = append_artificial_insn (bb);
     721                 :    1528456 :   bb->set_end_insn (insn);
     722                 :            : 
     723                 :    1528456 :   start_insn_accesses ();
     724                 :            : 
     725                 :            :   // Using LR to derive the liveness information means that we create an
     726                 :            :   // entry block definition for upwards exposed registers.  These registers
     727                 :            :   // are sometimes genuinely uninitialized.  However, some targets also
     728                 :            :   // create a pseudo PIC base register and only initialize it later.
     729                 :            :   // Handling that case correctly seems more important than optimizing
     730                 :            :   // uninitialized uses.
     731                 :    1528456 :   unsigned int regno;
     732                 :    1528456 :   bitmap_iterator in_bi;
     733                 :    9797172 :   EXECUTE_IF_SET_IN_BITMAP (&lr_info->out, 0, regno, in_bi)
     734                 :            :     {
     735                 :    8268716 :       auto *set = allocate<set_info> (insn, full_register (regno));
     736                 :    8268716 :       append_def (set);
     737                 :    8268716 :       m_temp_defs.safe_push (set);
     738                 :    8268716 :       bi.record_reg_def (set);
     739                 :            :     }
     740                 :            : 
     741                 :            :   // Create a definition that reflects the state of memory on entry to
     742                 :            :   // the function.
     743                 :    1528456 :   auto *set = allocate<set_info> (insn, memory);
     744                 :    1528456 :   append_def (set);
     745                 :    1528456 :   m_temp_defs.safe_push (set);
     746                 :    1528456 :   bi.record_mem_def (set);
     747                 :            : 
     748                 :    1528456 :   finish_insn_accesses (insn);
     749                 :    1528456 : }
     750                 :            : 
     751                 :            : // Lazily calculate the value of BI.ebb_live_in_for_debug for BI.current_ebb.
     752                 :            : void
     753                 :     255490 : function_info::calculate_ebb_live_in_for_debug (build_info &bi)
     754                 :            : {
     755                 :     255490 :   gcc_checking_assert (bitmap_empty_p (bi.tmp_ebb_live_in_for_debug));
     756                 :     255490 :   bi.ebb_live_in_for_debug = bi.tmp_ebb_live_in_for_debug;
     757                 :     255490 :   bitmap_and (bi.ebb_live_in_for_debug, bi.potential_phi_regs_for_debug,
     758                 :     510980 :               DF_LR_IN (bi.current_ebb->first_bb ()->cfg_bb ()));
     759                 :     255490 :   bitmap_tree_view (bi.ebb_live_in_for_debug);
     760                 :     255490 : }
     761                 :            : 
     762                 :            : // Called while building SSA form using BI.  Create phi nodes for the
     763                 :            : // current EBB.
     764                 :            : void
     765                 :    9254286 : function_info::add_phi_nodes (build_info &bi)
     766                 :            : {
     767                 :    9254286 :   ebb_info *ebb = bi.current_ebb;
     768                 :    9254286 :   basic_block cfg_bb = ebb->first_bb ()->cfg_bb ();
     769                 :            : 
     770                 :            :   // Create the register phis for this EBB.
     771                 :    9254286 :   bb_phi_info &phis = bi.bb_phis[cfg_bb->index];
     772                 :    9254286 :   unsigned int num_preds = phis.num_preds;
     773                 :    9254286 :   unsigned int regno;
     774                 :    9254286 :   bitmap_iterator in_bi;
     775                 :   13157896 :   EXECUTE_IF_SET_IN_BITMAP (&phis.regs, 0, regno, in_bi)
     776                 :            :     {
     777                 :    3903610 :       gcc_checking_assert (bitmap_bit_p (bi.potential_phi_regs, regno));
     778                 :            : 
     779                 :            :       // Create an array of phi inputs, to be filled in later.
     780                 :    3903610 :       auto *inputs = XOBNEWVEC (&m_obstack, access_info *, num_preds);
     781                 :    3903610 :       memset (inputs, 0, sizeof (access_info *) * num_preds);
     782                 :            : 
     783                 :            :       // Later code works out the correct mode of the phi.  Use BLKmode
     784                 :            :       // as a placeholder for now.
     785                 :    3903610 :       phi_info *phi = create_phi (ebb, { E_BLKmode, regno },
     786                 :            :                                   inputs, num_preds);
     787                 :    3903610 :       bi.record_reg_def (phi);
     788                 :            :     }
     789                 :            : 
     790                 :    9254286 :   bitmap_copy (bi.ebb_def_regs, &phis.regs);
     791                 :            : 
     792                 :            :   // Collect the live-in memory definitions and record whether they're
     793                 :            :   // all the same.
     794                 :    9254286 :   m_temp_defs.reserve (num_preds);
     795                 :    9254286 :   set_info *mem_value = nullptr;
     796                 :    9254286 :   bool mem_phi_is_degenerate = true;
     797                 :    9254286 :   edge e;
     798                 :    9254286 :   edge_iterator ei;
     799                 :   24945811 :   FOR_EACH_EDGE (e, ei, cfg_bb->preds)
     800                 :            :     {
     801                 :   15691525 :       bb_info *pred_bb = this->bb (e->src);
     802                 :   15691525 :       if (pred_bb && pred_bb->head_insn ())
     803                 :            :         {
     804                 :   14931658 :           mem_value = bi.bb_mem_live_out[pred_bb->index ()];
     805                 :   14931658 :           m_temp_defs.quick_push (mem_value);
     806                 :   14931658 :           if (mem_value != m_temp_defs[0])
     807                 :    4690265 :             mem_phi_is_degenerate = false;
     808                 :            :         }
     809                 :            :       else
     810                 :            :         {
     811                 :     759867 :           m_temp_defs.quick_push (nullptr);
     812                 :     759867 :           mem_phi_is_degenerate = false;
     813                 :            :         }
     814                 :            :     }
     815                 :            : 
     816                 :            :   // Create a phi for memory, on the assumption that something in the
     817                 :            :   // EBB will need it.
     818                 :    9254286 :   if (mem_phi_is_degenerate)
     819                 :            :     {
     820                 :    6400907 :       access_info *input[] = { mem_value };
     821                 :    6400907 :       mem_value = create_phi (ebb, memory, input, 1);
     822                 :            :     }
     823                 :            :   else
     824                 :            :     {
     825                 :    2853379 :       obstack_grow (&m_obstack, m_temp_defs.address (),
     826                 :            :                     num_preds * sizeof (access_info *));
     827                 :    2853379 :       auto *inputs = static_cast<access_info **> (obstack_finish (&m_obstack));
     828                 :    2853379 :       mem_value = create_phi (ebb, memory, inputs, num_preds);
     829                 :            :     }
     830                 :    9254286 :   bi.record_mem_def (mem_value);
     831                 :    9254286 :   m_temp_defs.truncate (0);
     832                 :    9254286 : }
     833                 :            : 
     834                 :            : // Called while building SSA form using BI.
     835                 :            : //
     836                 :            : // If FLAGS is DF_REF_AT_TOP, create the head insn for BI.current_bb
     837                 :            : // and populate its uses and definitions.  If FLAGS is 0, do the same
     838                 :            : // for the end insn.
     839                 :            : void
     840                 :   31156804 : function_info::add_artificial_accesses (build_info &bi, df_ref_flags flags)
     841                 :            : {
     842                 :   31156804 :   bb_info *bb = bi.current_bb;
     843                 :   31156804 :   basic_block cfg_bb = bb->cfg_bb ();
     844                 :   31156804 :   auto *lr_info = DF_LR_BB_INFO (cfg_bb);
     845                 :   31156804 :   df_ref ref;
     846                 :            : 
     847                 :   31156804 :   insn_info *insn;
     848                 :   31156804 :   if (flags == DF_REF_AT_TOP)
     849                 :            :     {
     850                 :   15578402 :       if (cfg_bb->index == EXIT_BLOCK)
     851                 :    1488714 :         insn = append_artificial_insn (bb);
     852                 :            :       else
     853                 :   14089688 :         insn = append_artificial_insn (bb, bb_note (cfg_bb));
     854                 :   15578402 :       bb->set_head_insn (insn);
     855                 :            :     }
     856                 :            :   else
     857                 :            :     {
     858                 :   15578402 :       insn = append_artificial_insn (bb);
     859                 :   15578402 :       bb->set_end_insn (insn);
     860                 :            :     }
     861                 :            : 
     862                 :   31156804 :   start_insn_accesses ();
     863                 :            : 
     864                 :  185797512 :   FOR_EACH_ARTIFICIAL_USE (ref, cfg_bb->index)
     865                 :  123483904 :     if ((DF_REF_FLAGS (ref) & DF_REF_AT_TOP) == flags)
     866                 :            :       {
     867                 :   61741952 :         unsigned int regno = DF_REF_REGNO (ref);
     868                 :   61741952 :         machine_mode mode = GET_MODE (DF_REF_REAL_REG (ref));
     869                 :            : 
     870                 :            :         // A definition must be available.
     871                 :   61741952 :         gcc_checking_assert (bitmap_bit_p (&lr_info->in, regno)
     872                 :            :                              || (flags != DF_REF_AT_TOP
     873                 :            :                                  && bitmap_bit_p (&lr_info->def, regno)));
     874                 :   61741952 :         m_temp_uses.safe_push (create_reg_use (bi, insn, { mode, regno }));
     875                 :            :       }
     876                 :            : 
     877                 :            :   // Track the return value of memory by adding an artificial use of
     878                 :            :   // memory at the end of the exit block.
     879                 :   31156804 :   if (flags == 0 && cfg_bb->index == EXIT_BLOCK)
     880                 :            :     {
     881                 :    1488714 :       auto *use = allocate<use_info> (insn, memory, bi.current_mem_value ());
     882                 :    1488714 :       add_use (use);
     883                 :    1488714 :       m_temp_uses.safe_push (use);
     884                 :            :     }
     885                 :            : 
     886                 :   63349060 :   FOR_EACH_ARTIFICIAL_DEF (ref, cfg_bb->index)
     887                 :    1035452 :     if ((DF_REF_FLAGS (ref) & DF_REF_AT_TOP) == flags)
     888                 :            :       {
     889                 :     517726 :         unsigned int regno = DF_REF_REGNO (ref);
     890                 :     517726 :         machine_mode mode = GET_MODE (DF_REF_REAL_REG (ref));
     891                 :     517726 :         resource_info resource { mode, regno };
     892                 :            : 
     893                 :            :         // We rely on the def set being correct.
     894                 :     517726 :         gcc_checking_assert (bitmap_bit_p (&lr_info->def, regno));
     895                 :            : 
     896                 :            :         // If the value isn't used later in the block and isn't live
     897                 :            :         // on exit, we could instead represent the definition as a
     898                 :            :         // clobber_info.  However, that case should be relatively
     899                 :            :         // rare and set_info is any case more compact than clobber_info.
     900                 :     517726 :         set_info *def = allocate<set_info> (insn, resource);
     901                 :     517726 :         append_def (def);
     902                 :     517726 :         m_temp_defs.safe_push (def);
     903                 :     517726 :         bi.record_reg_def (def);
     904                 :            :       }
     905                 :            : 
     906                 :            :   // Model the effect of a memory clobber on an incoming edge by adding
     907                 :            :   // a fake definition of memory at the start of the block.  We don't need
     908                 :            :   // to add a use of the phi node because memory is implicitly always live.
     909                 :   31156804 :   if (flags == DF_REF_AT_TOP && has_abnormal_call_or_eh_pred_edge_p (cfg_bb))
     910                 :            :     {
     911                 :     259903 :       set_info *def = allocate<set_info> (insn, memory);
     912                 :     259903 :       append_def (def);
     913                 :     259903 :       m_temp_defs.safe_push (def);
     914                 :     259903 :       bi.record_mem_def (def);
     915                 :            :     }
     916                 :            : 
     917                 :   31156804 :   finish_insn_accesses (insn);
     918                 :   31156804 : }
     919                 :            : 
     920                 :            : // Called while building SSA form using BI.  Create insn_infos for all
     921                 :            : // relevant instructions in BI.current_bb.
     922                 :            : void
     923                 :   14089688 : function_info::add_block_contents (build_info &bi)
     924                 :            : {
     925                 :   14089688 :   basic_block cfg_bb = bi.current_bb->cfg_bb ();
     926                 :   14089688 :   rtx_insn *insn;
     927                 :  325566362 :   FOR_BB_INSNS (cfg_bb, insn)
     928                 :  155738337 :     if (INSN_P (insn))
     929                 :  133221621 :       add_insn_to_block (bi, insn);
     930                 :   14089688 : }
     931                 :            : 
     932                 :            : // Called while building SSA form using BI.  Record live-out register values
     933                 :            : // in the phi inputs of successor blocks and create live-out uses where
     934                 :            : // appropriate.  Record the live-out memory value in BI.bb_mem_live_out.
     935                 :            : void
     936                 :   17106858 : function_info::record_block_live_out (build_info &bi)
     937                 :            : {
     938                 :   17106858 :   bb_info *bb = bi.current_bb;
     939                 :   17106858 :   ebb_info *ebb = bi.current_ebb;
     940                 :   17106858 :   basic_block cfg_bb = bb->cfg_bb ();
     941                 :            : 
     942                 :            :   // Record the live-out register values in the phi inputs of
     943                 :            :   // successor blocks.
     944                 :   17106858 :   edge e;
     945                 :   17106858 :   edge_iterator ei;
     946                 :   39122499 :   FOR_EACH_EDGE (e, ei, cfg_bb->succs)
     947                 :            :     {
     948                 :   22015641 :       bb_phi_info &phis = bi.bb_phis[e->dest->index];
     949                 :   22015641 :       unsigned int input_i = e->dest_idx * phis.num_phis;
     950                 :   22015641 :       unsigned int regno;
     951                 :   22015641 :       bitmap_iterator out_bi;
     952                 :   32472282 :       EXECUTE_IF_SET_IN_BITMAP (&phis.regs, 0, regno, out_bi)
     953                 :            :         {
     954                 :   20913282 :           phis.inputs[input_i]
     955                 :   10456641 :             = live_out_value (bb, bi.current_reg_value (regno));
     956                 :   10456641 :           input_i += 1;
     957                 :            :         }
     958                 :            :     }
     959                 :            : 
     960                 :            :   // Add the set of registers that were defined in this BB to the set
     961                 :            :   // of potentially-live registers defined in the EBB.
     962                 :   34213716 :   bitmap_ior_into (bi.ebb_def_regs, &DF_LR_BB_INFO (cfg_bb)->def);
     963                 :            : 
     964                 :            :   // Iterate through the registers in LIVE_OUT and see whether we need
     965                 :            :   // to add a live-out use for them.
     966                 :   34174288 :   auto record_live_out_regs = [&](bitmap live_out)
     967                 :            :     {
     968                 :   17067430 :       unsigned int regno;
     969                 :   17067430 :       bitmap_iterator out_bi;
     970                 :   44106964 :       EXECUTE_IF_AND_IN_BITMAP (bi.ebb_def_regs, live_out, 0, regno, out_bi)
     971                 :            :         {
     972                 :   27039534 :           set_info *value = live_out_value (bb, bi.current_reg_value (regno));
     973                 :   27039534 :           if (value && value->ebb () == ebb)
     974                 :   27025054 :             add_live_out_use (bb, value);
     975                 :            :         }
     976                 :   34174288 :     };
     977                 :            : 
     978                 :   17106858 :   if (bb == ebb->last_bb ())
     979                 :            :     // All live-out registers might need live-out uses.
     980                 :   21565484 :     record_live_out_regs (DF_LR_OUT (cfg_bb));
     981                 :            :   else
     982                 :            :     // Registers might need live-out uses if they are live on entry
     983                 :            :     // to a successor block in a different EBB.
     984                 :   18932920 :     FOR_EACH_EDGE (e, ei, cfg_bb->succs)
     985                 :            :       {
     986                 :   12608804 :         bb_info *dest_bb = this->bb (e->dest);
     987                 :   12608804 :         if (dest_bb->ebb () != ebb || dest_bb == ebb->first_bb ())
     988                 :   12569376 :           record_live_out_regs (DF_LR_IN (e->dest));
     989                 :            :       }
     990                 :            : 
     991                 :            :   // Record the live-out memory value.
     992                 :   34213716 :   bi.bb_mem_live_out[cfg_bb->index]
     993                 :   17106858 :     = live_out_value (bb, bi.current_mem_value ());
     994                 :   17106858 : }
     995                 :            : 
     996                 :            : // Add BB and its contents to the SSA information.
     997                 :            : void
     998                 :   17146600 : function_info::start_block (build_info &bi, bb_info *bb)
     999                 :            : {
    1000                 :   17146600 :   ebb_info *ebb = bb->ebb ();
    1001                 :            : 
    1002                 :            :   // We (need to) add all blocks from one EBB before moving on to the next.
    1003                 :   17146600 :   bi.current_bb = bb;
    1004                 :   17146600 :   if (bb == ebb->first_bb ())
    1005                 :   10822484 :     bi.current_ebb = ebb;
    1006                 :            :   else
    1007                 :    6324116 :     gcc_assert (bi.current_ebb == ebb);
    1008                 :            : 
    1009                 :            :   // Record the start of this block's definitions in the definitions stack.
    1010                 :   32764744 :   bi.old_def_stack_limit.safe_push (bi.def_stack.length ());
    1011                 :            : 
    1012                 :            :   // Add the block itself.
    1013                 :   17146600 :   append_bb (bb);
    1014                 :            : 
    1015                 :            :   // If the block starts an EBB, create the phi insn.  This insn should exist
    1016                 :            :   // for all EBBs, even if they don't (yet) need phis.
    1017                 :   17146600 :   if (bb == ebb->first_bb ())
    1018                 :   10822484 :     ebb->set_phi_insn (append_artificial_insn (bb));
    1019                 :            : 
    1020                 :   17146600 :   if (bb->index () == ENTRY_BLOCK)
    1021                 :            :     {
    1022                 :    1528456 :       add_entry_block_defs (bi);
    1023                 :    1528456 :       record_block_live_out (bi);
    1024                 :    1528456 :       return;
    1025                 :            :     }
    1026                 :            : 
    1027                 :   15618144 :   if (EDGE_COUNT (bb->cfg_bb ()->preds) == 0)
    1028                 :            :     {
    1029                 :            :       // Leave unreachable blocks empty, since there is no useful
    1030                 :            :       // liveness information for them, and anything they do will
    1031                 :            :       // be wasted work.  In a cleaned-up cfg, the only unreachable
    1032                 :            :       // block we should see is the exit block of a noreturn function.
    1033                 :      39742 :       bb->set_head_insn (append_artificial_insn (bb));
    1034                 :      39742 :       bb->set_end_insn (append_artificial_insn (bb));
    1035                 :      39742 :       return;
    1036                 :            :     }
    1037                 :            : 
    1038                 :            :   // If the block starts an EBB, create the phi nodes.
    1039                 :   15578402 :   if (bb == ebb->first_bb ())
    1040                 :    9254286 :     add_phi_nodes (bi);
    1041                 :            : 
    1042                 :            :   // Process the contents of the block.
    1043                 :   15578402 :   add_artificial_accesses (bi, DF_REF_AT_TOP);
    1044                 :   15578402 :   if (bb->index () != EXIT_BLOCK)
    1045                 :   14089688 :     add_block_contents (bi);
    1046                 :   15578402 :   add_artificial_accesses (bi, df_ref_flags ());
    1047                 :   15578402 :   record_block_live_out (bi);
    1048                 :            : 
    1049                 :            :   // If we needed to calculate a live-in set for debug purposes,
    1050                 :            :   // reset it to null at the end of the EBB.  Convert the underlying
    1051                 :            :   // bitmap to an empty list view, ready for the next calculation.
    1052                 :   15578402 :   if (bi.ebb_live_in_for_debug && bb == ebb->last_bb ())
    1053                 :            :     {
    1054                 :     255490 :       bitmap_clear (bi.tmp_ebb_live_in_for_debug);
    1055                 :     255490 :       bitmap_list_view (bi.tmp_ebb_live_in_for_debug);
    1056                 :     255490 :       bi.ebb_live_in_for_debug = nullptr;
    1057                 :            :     }
    1058                 :            : }
    1059                 :            : 
    1060                 :            : // Finish adding BB and the blocks that it dominates to the SSA information.
    1061                 :            : void
    1062                 :   17146600 : function_info::end_block (build_info &bi, bb_info *bb)
    1063                 :            : {
    1064                 :            :   // Restore the register last_access information to the state it was
    1065                 :            :   // in before we started processing BB.
    1066                 :   17146600 :   unsigned int old_limit = bi.old_def_stack_limit.pop ();
    1067                 :  201786768 :   while (bi.def_stack.length () > old_limit)
    1068                 :            :     {
    1069                 :            :       // We pushed a definition in BB if it was the first dominating
    1070                 :            :       // definition (and so the previous entry was null).  In other
    1071                 :            :       // cases we pushed the previous dominating definition.
    1072                 :   83746784 :       def_info *def = bi.def_stack.pop ();
    1073                 :   83746784 :       unsigned int regno = def->regno ();
    1074                 :   83746784 :       if (def->bb () == bb)
    1075                 :   50957084 :         def = nullptr;
    1076                 :   83746784 :       bi.last_access[regno + 1] = def;
    1077                 :            :     }
    1078                 :   17146600 : }
    1079                 :            : 
    1080                 :            : // Finish setting up the phi nodes for each block, now that we've added
    1081                 :            : // the contents of all blocks.
    1082                 :            : void
    1083                 :    1528456 : function_info::populate_phi_inputs (build_info &bi)
    1084                 :            : {
    1085                 :    1528456 :   auto_vec<phi_info *, 32> sorted_phis;
    1086                 :   23173424 :   for (ebb_info *ebb : ebbs ())
    1087                 :            :     {
    1088                 :   10822484 :       if (!ebb->first_phi ())
    1089                 :    2404127 :         continue;
    1090                 :            : 
    1091                 :            :       // Get a sorted array of EBB's phi nodes.
    1092                 :    8418357 :       basic_block cfg_bb = ebb->first_bb ()->cfg_bb ();
    1093                 :    8418357 :       bb_phi_info &phis = bi.bb_phis[cfg_bb->index];
    1094                 :    8418357 :       sorted_phis.truncate (0);
    1095                 :   26899021 :       for (phi_info *phi : ebb->phis ())
    1096                 :   18480664 :         sorted_phis.safe_push (phi);
    1097                 :    8418357 :       std::sort (sorted_phis.address (),
    1098                 :   16836714 :                  sorted_phis.address () + sorted_phis.length (),
    1099                 :            :                  compare_access_infos);
    1100                 :            : 
    1101                 :            :       // Set the inputs of the non-degenerate register phis.  All inputs
    1102                 :            :       // for one edge come before all inputs for the next edge.
    1103                 :    8418357 :       set_info **inputs = phis.inputs;
    1104                 :    8418357 :       unsigned int phi_i = 0;
    1105                 :    8418357 :       bitmap_iterator bmi;
    1106                 :    8418357 :       unsigned int regno;
    1107                 :   12321967 :       EXECUTE_IF_SET_IN_BITMAP (&phis.regs, 0, regno, bmi)
    1108                 :            :         {
    1109                 :            :           // Skip intervening degenerate phis.
    1110                 :    4701955 :           while (sorted_phis[phi_i]->regno () < regno)
    1111                 :     798345 :             phi_i += 1;
    1112                 :    3903610 :           phi_info *phi = sorted_phis[phi_i];
    1113                 :    3903610 :           gcc_assert (phi->regno () == regno);
    1114                 :   14360251 :           for (unsigned int input_i = 0; input_i < phis.num_preds; ++input_i)
    1115                 :   10456641 :             if (set_info *input = inputs[input_i * phis.num_phis])
    1116                 :            :               {
    1117                 :   10447070 :                 use_info *use = phi->input_use (input_i);
    1118                 :   10447070 :                 gcc_assert (!use->def ());
    1119                 :   10447070 :                 use->set_def (input);
    1120                 :   10447070 :                 add_use (use);
    1121                 :            :               }
    1122                 :    3903610 :           phi_i += 1;
    1123                 :    3903610 :           inputs += 1;
    1124                 :            :         }
    1125                 :            : 
    1126                 :            :       // Fill in the backedge inputs to any memory phi.
    1127                 :    8418357 :       phi_info *mem_phi = sorted_phis.last ();
    1128                 :    8418357 :       if (mem_phi->is_mem () && !mem_phi->is_degenerate ())
    1129                 :            :         {
    1130                 :    2853379 :           edge e;
    1131                 :    2853379 :           edge_iterator ei;
    1132                 :   10857010 :           FOR_EACH_EDGE (e, ei, cfg_bb->preds)
    1133                 :            :             {
    1134                 :    8003631 :               use_info *use = mem_phi->input_use (e->dest_idx);
    1135                 :    8003631 :               if (!use->def ())
    1136                 :            :                 {
    1137                 :     759867 :                   use->set_def (bi.bb_mem_live_out[e->src->index]);
    1138                 :     759867 :                   add_use (use);
    1139                 :            :                 }
    1140                 :            :             }
    1141                 :            :         }
    1142                 :            :     }
    1143                 :    1528456 : }
    1144                 :            : 
    1145                 :            : // Return true if it would be better to continue an EBB across NEW_EDGE
    1146                 :            : // rather than across OLD_EDGE, given that both edges are viable candidates.
    1147                 :            : // This is not a total ordering.
    1148                 :            : static bool
    1149                 :    1613248 : better_ebb_edge_p (edge new_edge, edge old_edge)
    1150                 :            : {
    1151                 :            :   // Prefer the likeliest edge.
    1152                 :    1613248 :   if (new_edge->probability.initialized_p ()
    1153                 :    1612587 :       && old_edge->probability.initialized_p ()
    1154                 :    3225835 :       && !(old_edge->probability == new_edge->probability))
    1155                 :    1356896 :     return old_edge->probability < new_edge->probability;
    1156                 :            : 
    1157                 :            :   // If both edges are equally likely, prefer a fallthru edge.
    1158                 :     256352 :   if (new_edge->flags & EDGE_FALLTHRU)
    1159                 :            :     return true;
    1160                 :     173196 :   if (old_edge->flags & EDGE_FALLTHRU)
    1161                 :            :     return false;
    1162                 :            : 
    1163                 :            :   // Otherwise just stick with OLD_EDGE.
    1164                 :            :   return false;
    1165                 :            : }
    1166                 :            : 
    1167                 :            : // Pick and return the next basic block in an EBB that currently ends with BB.
    1168                 :            : // Return null if the EBB must end with BB.
    1169                 :            : static basic_block
    1170                 :   17146600 : choose_next_block_in_ebb (basic_block bb)
    1171                 :            : {
    1172                 :            :   // Although there's nothing in principle wrong with having an EBB that
    1173                 :            :   // starts with the entry block and includes later blocks, there's not
    1174                 :            :   // really much point either.  Keeping the entry block separate means
    1175                 :            :   // that uses of arguments consistently occur through phi nodes, rather
    1176                 :            :   // than the arguments sometimes appearing to come from an EBB-local
    1177                 :            :   // definition instead.
    1178                 :   17146600 :   if (bb->index == ENTRY_BLOCK)
    1179                 :            :     return nullptr;
    1180                 :            : 
    1181                 :   15618144 :   bool optimize_for_speed_p = optimize_bb_for_speed_p (bb);
    1182                 :   15618144 :   edge best_edge = nullptr;
    1183                 :   15618144 :   edge e;
    1184                 :   15618144 :   edge_iterator ei;
    1185                 :   36105329 :   FOR_EACH_EDGE (e, ei, bb->succs)
    1186                 :   20487185 :     if (!(e->flags & EDGE_COMPLEX)
    1187                 :   19176442 :         && e->dest->index != EXIT_BLOCK
    1188                 :   29158087 :         && single_pred_p (e->dest)
    1189                 :    8670902 :         && optimize_for_speed_p == optimize_bb_for_speed_p (e->dest)
    1190                 :   28424549 :         && (!best_edge || better_ebb_edge_p (e, best_edge)))
    1191                 :    6979121 :       best_edge = e;
    1192                 :            : 
    1193                 :   15618144 :   return best_edge ? best_edge->dest : nullptr;
    1194                 :            : }
    1195                 :            : 
    1196                 :            : // Partition the function into extended basic blocks.  Create the
    1197                 :            : // associated ebb_infos and bb_infos, but don't add the bb_infos
    1198                 :            : // to the function list yet.
    1199                 :            : void
    1200                 :    1528456 : function_info::create_ebbs (build_info &bi)
    1201                 :            : {
    1202                 :            :   // Compute the starting reverse postorder.  We tweak this later to try
    1203                 :            :   // to get better EBB assignments.
    1204                 :    1528456 :   auto *postorder = new int[n_basic_blocks_for_fn (m_fn)];
    1205                 :    1528456 :   unsigned int postorder_num
    1206                 :    1528456 :     = pre_and_rev_post_order_compute (nullptr, postorder, true);
    1207                 :    1528456 :   gcc_assert (int (postorder_num) <= n_basic_blocks_for_fn (m_fn));
    1208                 :            : 
    1209                 :            :   // Iterate over the blocks in reverse postorder.  In cases where
    1210                 :            :   // multiple possible orders exist, prefer orders that chain blocks
    1211                 :            :   // together into EBBs.  If multiple possible EBBs exist, try to pick
    1212                 :            :   // the ones that are most likely to be profitable.
    1213                 :    1528456 :   auto_vec<bb_info *, 16> bbs;
    1214                 :    1528456 :   unsigned int next_bb_index = 0;
    1215                 :   18675056 :   for (unsigned int i = 0; i < postorder_num; ++i)
    1216                 :   17146600 :     if (!m_bbs[postorder[i]])
    1217                 :            :       {
    1218                 :            :         // Choose and create the blocks that should form the next EBB.
    1219                 :   10822484 :         basic_block cfg_bb = BASIC_BLOCK_FOR_FN (m_fn, postorder[i]);
    1220                 :   17146600 :         do
    1221                 :            :           {
    1222                 :            :             // Record the chosen block order in a new RPO.
    1223                 :   17146600 :             bi.bb_to_rpo[cfg_bb->index] = next_bb_index++;
    1224                 :   17146600 :             bbs.safe_push (create_bb_info (cfg_bb));
    1225                 :   17146600 :             cfg_bb = choose_next_block_in_ebb (cfg_bb);
    1226                 :            :           }
    1227                 :   17146600 :         while (cfg_bb);
    1228                 :            : 
    1229                 :            :         // Create the EBB itself.
    1230                 :   10822484 :         auto *ebb = allocate<ebb_info> (bbs[0], bbs.last ());
    1231                 :   49614052 :         for (bb_info *bb : bbs)
    1232                 :   17146600 :           bb->set_ebb (ebb);
    1233                 :   10822484 :         bbs.truncate (0);
    1234                 :            :       }
    1235                 :            : 
    1236                 :    1528456 :   delete[] postorder;
    1237                 :    1528456 : }
    1238                 :            : 
    1239                 :            : // Partition the function's blocks into EBBs and build SSA form for all
    1240                 :            : // EBBs in the function.
    1241                 :            : void
    1242                 :    1528456 : function_info::process_all_blocks ()
    1243                 :            : {
    1244                 :    3056912 :   auto temps = temp_watermark ();
    1245                 :    1528456 :   unsigned int num_bb_indices = last_basic_block_for_fn (m_fn);
    1246                 :            : 
    1247                 :    3056912 :   build_info bi (m_num_regs, num_bb_indices);
    1248                 :            : 
    1249                 :    1528456 :   calculate_potential_phi_regs (bi);
    1250                 :    1528456 :   create_ebbs (bi);
    1251                 :    1528456 :   place_phis (bi);
    1252                 :    1528456 :   bb_walker (this, bi).walk (ENTRY_BLOCK_PTR_FOR_FN (m_fn));
    1253                 :    1528456 :   populate_phi_inputs (bi);
    1254                 :            : 
    1255                 :    1528456 :   if (flag_checking)
    1256                 :            :     {
    1257                 :            :       // The definition stack should be empty and all register definitions
    1258                 :            :       // should be back in their original undefined state.
    1259                 :    3056872 :       gcc_assert (bi.def_stack.is_empty ()
    1260                 :            :                   && bi.old_def_stack_limit.is_empty ());
    1261                 :  179914223 :       for (unsigned int regno = 0; regno < m_num_regs; ++regno)
    1262                 :  178385787 :         gcc_assert (!bi.last_access[regno + 1]);
    1263                 :            :     }
    1264                 :    1528456 : }
    1265                 :            : 
    1266                 :            : // Print a description of CALL_CLOBBERS to PP.
    1267                 :            : void
    1268                 :          0 : rtl_ssa::pp_ebb_call_clobbers (pretty_printer *pp,
    1269                 :            :                                const ebb_call_clobbers_info *call_clobbers)
    1270                 :            : {
    1271                 :          0 :   if (!call_clobbers)
    1272                 :          0 :     pp_string (pp, "<null>");
    1273                 :            :   else
    1274                 :          0 :     call_clobbers->print_full (pp);
    1275                 :          0 : }
    1276                 :            : 
    1277                 :            : // Print a description of BB to PP.
    1278                 :            : void
    1279                 :          0 : rtl_ssa::pp_bb (pretty_printer *pp, const bb_info *bb)
    1280                 :            : {
    1281                 :          0 :   if (!bb)
    1282                 :          0 :     pp_string (pp, "<null>");
    1283                 :            :   else
    1284                 :          0 :     bb->print_full (pp);
    1285                 :          0 : }
    1286                 :            : 
    1287                 :            : // Print a description of EBB to PP
    1288                 :            : void
    1289                 :          0 : rtl_ssa::pp_ebb (pretty_printer *pp, const ebb_info *ebb)
    1290                 :            : {
    1291                 :          0 :   if (!ebb)
    1292                 :          0 :     pp_string (pp, "<null>");
    1293                 :            :   else
    1294                 :          0 :     ebb->print_full (pp);
    1295                 :          0 : }
    1296                 :            : 
    1297                 :            : // Print a description of CALL_CLOBBERS to FILE.
    1298                 :            : void
    1299                 :          0 : dump (FILE *file, const ebb_call_clobbers_info *call_clobbers)
    1300                 :            : {
    1301                 :          0 :   dump_using (file, pp_ebb_call_clobbers, call_clobbers);
    1302                 :          0 : }
    1303                 :            : 
    1304                 :            : // Print a description of BB to FILE.
    1305                 :            : void
    1306                 :          0 : dump (FILE *file, const bb_info *bb)
    1307                 :            : {
    1308                 :          0 :   dump_using (file, pp_bb, bb);
    1309                 :          0 : }
    1310                 :            : 
    1311                 :            : // Print a description of EBB to FILE.
    1312                 :            : void
    1313                 :          0 : dump (FILE *file, const ebb_info *ebb)
    1314                 :            : {
    1315                 :          0 :   dump_using (file, pp_ebb, ebb);
    1316                 :          0 : }
    1317                 :            : 
    1318                 :            : // Debug interfaces to the dump routines above.
    1319                 :          0 : void debug (const ebb_call_clobbers_info *x) { dump (stderr, x); }
    1320                 :          0 : void debug (const bb_info *x) { dump (stderr, x); }
    1321                 :          0 : void debug (const ebb_info *x) { dump (stderr, x); }

Generated by: LCOV version 1.15+git.20200812.d100e6c

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.