This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/83023] branch probabilities pessimize malloc


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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Author: marxin
Date: Tue Aug  7 11:59:13 2018
New Revision: 263355

URL: https://gcc.gnu.org/viewcvs?rev=263355&root=gcc&view=rev
Log:
Add malloc predictor (PR middle-end/83023).

2018-08-07  Martin Liska  <mliska@suse.cz>

        PR middle-end/83023
        * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
        BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
        * predict.def (PRED_MALLOC_NONNULL): New predictor.
        * doc/extend.texi: Document that malloc attribute adds
        hit to compiler.
2018-08-07  Martin Liska  <mliska@suse.cz>

        PR middle-end/83023
        * gcc.dg/predict-16.c: New test.
        * g++.dg/predict-1.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/predict-1.C
    trunk/gcc/testsuite/gcc.dg/predict-16.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/doc/extend.texi
    trunk/gcc/predict.c
    trunk/gcc/predict.def
    trunk/gcc/testsuite/ChangeLog

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]