public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/107670] New: Suspicious redundant code in ipa-cp
@ 2022-11-14  2:56 fxue at os dot amperecomputing.com
  2022-11-21 10:17 ` [Bug ipa/107670] " marxin at gcc dot gnu.org
  2023-03-22 21:47 ` jamborm at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: fxue at os dot amperecomputing.com @ 2022-11-14  2:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107670

            Bug ID: 107670
           Summary: Suspicious redundant code in ipa-cp
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fxue at os dot amperecomputing.com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Function "ipa_prop_read_jump_functions()" in ipa-prop.c:

  ipa_check_create_node_params ();
  ipa_check_create_edge_args ();

These two are also called inside the immediately following statement:

  ipa_register_cgraph_hooks();



Function "ipa_fn_summary_read()" in ipa-fnsummary.cc:

  ipa-cp's hooks will be registered twice in this function. One is indirectly
done by ipa_prop_read_jump_functions(), and the other is by a nearby call to
ipa_register_cgraph_hooks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ipa/107670] Suspicious redundant code in ipa-cp
  2022-11-14  2:56 [Bug ipa/107670] New: Suspicious redundant code in ipa-cp fxue at os dot amperecomputing.com
@ 2022-11-21 10:17 ` marxin at gcc dot gnu.org
  2023-03-22 21:47 ` jamborm at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-21 10:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107670

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-11-21
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Leaving to Martin Jambor.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug ipa/107670] Suspicious redundant code in ipa-cp
  2022-11-14  2:56 [Bug ipa/107670] New: Suspicious redundant code in ipa-cp fxue at os dot amperecomputing.com
  2022-11-21 10:17 ` [Bug ipa/107670] " marxin at gcc dot gnu.org
@ 2023-03-22 21:47 ` jamborm at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jamborm at gcc dot gnu.org @ 2023-03-22 21:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107670

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jamborm at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> ---
ipa_check_create_node_params and ipa_check_create_edge_args are mostly
left-overs from when summarries were arrays indexed by cgraph_node and
cgraph_edge uids.  Those arrays then sometimes needed to be properly resized,
which is not the case any more with hash-table based summary holder classes.

Currently these functions just make sure that ipa_node_params_sum and
ipa_edge_args_sum (and the hash tables for value ranges and bit information in
it) have been allocated.  This can probably be done much less often, let me
review all the places where they are called next stage 1.  Their comments are
also from a different era ;-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-22 21:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14  2:56 [Bug ipa/107670] New: Suspicious redundant code in ipa-cp fxue at os dot amperecomputing.com
2022-11-21 10:17 ` [Bug ipa/107670] " marxin at gcc dot gnu.org
2023-03-22 21:47 ` jamborm at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).