Bug 18874 - src/gold/gc.h:207: performance tweek ?
Summary: src/gold/gc.h:207: performance tweek ?
Status: RESOLVED NOTABUG
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.26
: P2 minor
Target Milestone: ---
Assignee: Cary Coutant
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-26 09:10 UTC by dcb
Modified: 2020-10-30 14:39 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dcb 2015-08-26 09:10:42 UTC
[src/gold/gc.h:207]: (performance) Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant.

Source code is

 if (parameters->options().icf_enabled()
      && is_section_foldable_candidate(src_section_name.c_str()))

but

inline bool
is_section_foldable_candidate(const std::string& section_name)
Comment 1 dcb 2016-07-07 21:10:42 UTC
Still broken, some eleven months later.
Comment 2 Tom Tromey 2020-10-30 14:39:00 UTC
Looks like this was fixed by

commit e173ea00c2941af42ea4e2267446d6039a70da6e
Author: Joshua Oreman <oremanj@hudson-trading.com>
Date:   Sat May 11 07:27:10 2019 +0800

    Fix problem with ICF where diffs in EH frame info is ignored.
    
            PR gold/21066