diff options
| author | Paul Eggert | 2019-04-18 00:30:24 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-04-18 00:35:18 -0700 |
| commit | 6d6c55db2cdfb6b354873f17285a3f602e011817 (patch) | |
| tree | fc9647797be220e613962260700c05e5f37100c1 /src/timefns.c | |
| parent | dded2c4cf30fbdb5e90c44bc76a26970d00e0f22 (diff) | |
| download | emacs-6d6c55db2cdfb6b354873f17285a3f602e011817.tar.gz emacs-6d6c55db2cdfb6b354873f17285a3f602e011817.zip | |
Mark _Noreturn error functions as cold
On my platform this made ‘make compile-always’ 1.3% faster.
Suggested by Alex Gramiak in:
https://lists.gnu.org/r/emacs-devel/2019-04/msg00684.html
* configure.ac (nw): Don’t use -Wsuggest-attribute=cold.
* lib-src/make-docfile.c (write_globals):
Mark noreturn functions as cold.
* src/callproc.c (exec_failed):
* src/data.c (wrong_length_argument, wrong_type_argument):
* src/emacs-module.c (module_abort):
* src/emacs.c (terminate_due_to_signal):
* src/eval.c (unwind_to_catch):
* src/image.c (my_png_error, my_error_exit):
* src/json.c (json_out_of_memory, json_parse_error):
* src/keyboard.c (quit_throw_to_read_char, user_error):
* src/lisp.h (die, wrong_type_argument, wrong_choice)
(args_out_of_range, args_out_of_range_3, circular_list)
(buffer_overflow, memory_full, buffer_memory_full)
(string_overflow, xsignal, xsignal0, xsignal1, xsignal2)
(xsignal3, signal_error, overflow_error, error, verror)
(nsberror, report_file_errno, report_file_error)
(report_file_notify_error, terminate_due_to_signal)
(emacs_abort, fatal):
* src/lread.c (load_error_old_style_backquotes)
(end_of_file_error, invalid_syntax):
* src/pdumper.c (error_unsupported_dump_object):
* src/puresize.h (pure_write_error):
* src/search.c (matcher_overflow):
* src/sound.c (sound_perror, alsa_sound_perror):
* src/sysdep.c (handle_arith_signal):
* src/systime.h (time_overflow):
* src/term.c (maybe_fatal, vfatal):
* src/textprop.c (text_read_only):
* src/timefns.c (invalid_time_zone_specification)
(time_error, invalid_hz):
* src/xterm.c (x_connection_closed):
Use AVOID instead of _Noreturn void, so that it’s marked cold.
* src/conf_post.h (__has_attribute_cold) [!__has_attribute]:
New macro.
(ATTRIBUTE_COLD): New macro.
* src/frame.h (WINDOW_SYSTEM_RETURN): Add ATTRIBUTE_COLD.
* src/lisp.h (AVOID): New macro.
* src/xterm.c: Omit unnecessary static decls, so that we needn’t
worry about which functions should be marked cold.
(x_io_error_quitter): Mark as cold.
Diffstat (limited to 'src/timefns.c')
| -rw-r--r-- | src/timefns.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/timefns.c b/src/timefns.c index 514fa24f8b9..cb953d1b4ce 100644 --- a/src/timefns.c +++ b/src/timefns.c | |||
| @@ -172,7 +172,7 @@ emacs_localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) | |||
| 172 | return tm; | 172 | return tm; |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | static _Noreturn void | 175 | static AVOID |
| 176 | invalid_time_zone_specification (Lisp_Object zone) | 176 | invalid_time_zone_specification (Lisp_Object zone) |
| 177 | { | 177 | { |
| 178 | xsignal2 (Qerror, build_string ("Invalid time zone specification"), zone); | 178 | xsignal2 (Qerror, build_string ("Invalid time zone specification"), zone); |
| @@ -337,7 +337,7 @@ time_overflow (void) | |||
| 337 | error ("Specified time is not representable"); | 337 | error ("Specified time is not representable"); |
| 338 | } | 338 | } |
| 339 | 339 | ||
| 340 | static _Noreturn void | 340 | static AVOID |
| 341 | time_error (int err) | 341 | time_error (int err) |
| 342 | { | 342 | { |
| 343 | switch (err) | 343 | switch (err) |
| @@ -348,7 +348,7 @@ time_error (int err) | |||
| 348 | } | 348 | } |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | static _Noreturn void | 351 | static AVOID |
| 352 | invalid_hz (Lisp_Object hz) | 352 | invalid_hz (Lisp_Object hz) |
| 353 | { | 353 | { |
| 354 | xsignal2 (Qerror, build_string ("Invalid time frequency"), hz); | 354 | xsignal2 (Qerror, build_string ("Invalid time frequency"), hz); |