2019-08-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2018-12-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/85593
+ * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
+ for functions with naked attribute.
+
2018-11-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87895
assemble_start_function (current_function_decl, fnname);
final_start_function (get_insns (), asm_out_file, optimize);
final (get_insns (), asm_out_file, optimize);
- if (flag_ipa_ra)
+ if (flag_ipa_ra
+ /* Functions with naked attributes are supported only with basic asm
+ statements in the body, thus for supported use cases the information
+ on clobbered registers is not available. */
+ && !lookup_attribute ("naked", DECL_ATTRIBUTES (current_function_decl)))
collect_fn_hard_reg_usage ();
final_end_function ();