From: "H.J. Lu" <hjl.tools@gmail.com>
To: Richard Sandiford <richard.sandiford@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [21/32] Remove global call sets: LRA
Date: Fri, 04 Oct 2019 18:03:00 -0000 [thread overview]
Message-ID: <CAMe9rOpea=7YJ4XqKPpMNuGdoEWds1EZSXdah4THzqS70b+0Sg@mail.gmail.com> (raw)
In-Reply-To: <mptzhjave69.fsf@arm.com>
On Wed, Sep 11, 2019 at 12:14 PM Richard Sandiford
<richard.sandiford@arm.com> wrote:
>
> lra_reg has an actual_call_used_reg_set field that is only used during
> inheritance. This in turn required a special lra_create_live_ranges
> pass for flag_ipa_ra to set up this field. This patch instead makes
> the inheritance code do its own live register tracking, using the
> same ABI-mask-and-clobber-set pair as for IRA.
>
> Tracking ABIs simplifies (and cheapens) the logic in lra-lives.c and
> means we no longer need a separate path for -fipa-ra. It also means
> we can remove TARGET_RETURN_CALL_WITH_MAX_CLOBBERS.
>
> The patch also strengthens the sanity check in lra_assigns so that
> we check that reg_renumber is consistent with the whole conflict set,
> not just the call-clobbered registers.
>
>
> 2019-09-11 Richard Sandiford <richard.sandiford@arm.com>
>
> gcc/
> * target.def (return_call_with_max_clobbers): Delete.
> * doc/tm.texi.in (TARGET_RETURN_CALL_WITH_MAX_CLOBBERS): Delete.
> * doc/tm.texi: Regenerate.
> * config/aarch64/aarch64.c (aarch64_return_call_with_max_clobbers)
> (TARGET_RETURN_CALL_WITH_MAX_CLOBBERS): Delete.
> * lra-int.h (lra_reg::actual_call_used_reg_set): Delete.
> (lra_reg::call_insn): Delete.
> * lra.c: Include function-abi.h.
> (initialize_lra_reg_info_element): Don't initialize the fields above.
> (lra): Use crtl->abi to test whether the current function needs to
> save a register in the prologue. Remove special pre-inheritance
> lra_create_live_ranges pass for flag_ipa_ra.
> * lra-assigns.c: Include function-abi.h
> (find_hard_regno_for_1): Use crtl->abi to test whether the current
> function needs to save a register in the prologue.
> (lra_assign): Assert that registers aren't allocated to a
> conflicting register, rather than checking only for overlaps
> with call_used_or_fixed_regs. Do this even for flag_ipa_ra,
> and for registers that are not live across a call.
> * lra-constraints.c (last_call_for_abi): New variable.
> (full_and_partial_call_clobbers): Likewise.
> (setup_next_usage_insn): Remove the register from
> full_and_partial_call_clobbers.
> (need_for_call_save_p): Use call_clobbered_in_region_p to test
> whether the register needs a caller save.
> (need_for_split_p): Use full_and_partial_reg_clobbers instead
> of call_used_or_fixed_regs.
> (inherit_in_ebb): Initialize and maintain last_call_for_abi and
> full_and_partial_call_clobbers.
> * lra-lives.c (check_pseudos_live_through_calls): Replace
> last_call_used_reg_set and call_insn arguments with an abi argument.
> Remove handling of lra_reg::call_insn. Use function_abi::mode_clobbers
> as the set of conflicting registers.
> (calls_have_same_clobbers_p): Delete.
> (process_bb_lives): Track the ABI of the last call instead of an
> insn/HARD_REG_SET pair. Update calls to
> check_pseudos_live_through_calls. Use eh_edge_abi to calculate
> the set of registers that could be clobbered by an EH edge.
> Include partially-clobbered as well as fully-clobbered registers.
> (lra_create_live_ranges_1): Don't initialize lra_reg::call_insn.
> * lra-remat.c: Include function-abi.h.
> (call_used_regs_arr_len, call_used_regs_arr): Delete.
> (set_bb_regs): Use call_insn_abi to get the set of call-clobbered
> registers and bitmap_view to combine them into dead_regs.
> (call_used_input_regno_present_p): Take a function_abi argument
> and use it to test whether a register is call-clobbered.
> (calculate_gen_cands): Use call_insn_abi to get the ABI of the
> call insn target. Update tje call to call_used_input_regno_present_p.
> (do_remat): Likewise.
> (lra_remat): Remove the initialization of call_used_regs_arr_len
> and call_used_regs_arr.
This caused:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91994
--
H.J.
next prev parent reply other threads:[~2019-10-04 18:03 UTC|newest]
Thread overview: 100+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 19:02 [00/32] Support multiple ABIs in the same translation unit Richard Sandiford
2019-09-11 19:03 ` [02/32] Add a target hook for getting an ABI from a function type Richard Sandiford
2019-09-29 20:52 ` Jeff Law
2019-09-11 19:03 ` [01/32] Add function_abi.{h,cc} Richard Sandiford
2019-09-29 20:51 ` Jeff Law
2019-09-30 9:19 ` Richard Sandiford
2019-09-30 21:16 ` Jeff Law
2019-09-11 19:04 ` [03/32] Add a function for getting the ABI of a call insn target Richard Sandiford
2019-09-25 15:38 ` Richard Sandiford
2019-09-30 15:52 ` Jeff Law
2019-09-30 16:32 ` Richard Sandiford
2019-09-30 16:46 ` Jeff Law
2019-09-11 19:05 ` [05/32] Pass an ABI identifier to hard_regno_call_part_clobbered Richard Sandiford
2019-09-29 20:58 ` Jeff Law
2019-09-11 19:05 ` [04/32] [x86] Robustify vzeroupper handling across calls Richard Sandiford
2019-09-25 15:48 ` Richard Sandiford
2019-09-25 18:11 ` Uros Bizjak
2019-10-01 10:14 ` Uros Bizjak
2019-10-08 18:17 ` Uros Bizjak
2019-09-11 19:06 ` [06/32] Pass an ABI to choose_hard_reg_mode Richard Sandiford
2019-09-29 21:00 ` Jeff Law
2019-09-11 19:07 ` [08/32] Remove global call sets: cfgcleanup.c Richard Sandiford
2019-09-29 21:02 ` Jeff Law
2019-09-11 19:07 ` [07/32] Remove global call sets: caller-save.c Richard Sandiford
2019-09-29 21:01 ` Jeff Law
2019-09-11 19:08 ` [10/32] Remove global call sets: combine.c Richard Sandiford
2019-09-12 2:18 ` Segher Boessenkool
2019-09-12 7:52 ` Richard Sandiford
2019-09-20 0:43 ` Segher Boessenkool
2019-09-25 15:52 ` Richard Sandiford
2019-09-25 16:30 ` Segher Boessenkool
2019-09-29 22:32 ` Jeff Law
2019-09-29 22:43 ` Segher Boessenkool
2019-09-11 19:08 ` [09/32] Remove global call sets: cfgloopanal.c Richard Sandiford
2019-09-29 21:02 ` Jeff Law
2019-09-11 19:09 ` [12/32] Remove global call sets: cselib.c Richard Sandiford
2019-09-29 21:05 ` Jeff Law
2019-10-29 9:20 ` Martin Liška
2019-09-11 19:09 ` [11/32] Remove global call sets: cse.c Richard Sandiford
2019-09-25 15:57 ` Richard Sandiford
2019-09-29 21:04 ` Jeff Law
2019-09-30 16:23 ` Richard Sandiford
2019-09-11 19:10 ` [13/32] Remove global call sets: DF (EH edges) Richard Sandiford
2019-09-29 21:07 ` Jeff Law
2019-09-11 19:10 ` [14/32] Remove global call sets: DF (entry/exit defs) Richard Sandiford
2019-09-29 21:07 ` Jeff Law
2019-09-11 19:11 ` [15/32] Remove global call sets: early-remat.c Richard Sandiford
2019-09-29 21:09 ` Jeff Law
2019-09-11 19:11 ` [17/32] Remove global call sets: gcse.c Richard Sandiford
2019-09-25 16:04 ` Richard Sandiford
2019-09-29 21:10 ` Jeff Law
2019-09-11 19:11 ` [16/32] Remove global call sets: function.c Richard Sandiford
2019-09-29 21:10 ` Jeff Law
2019-09-11 19:12 ` [18/32] Remove global call sets: haifa-sched.c Richard Sandiford
2019-09-29 21:11 ` Jeff Law
2019-09-11 19:12 ` [19/32] Remove global call sets: IRA Richard Sandiford
2019-09-30 15:16 ` Jeff Law
2019-09-11 19:13 ` [20/32] Remove global call sets: loop-iv.c Richard Sandiford
2019-09-29 21:20 ` Jeff Law
2019-09-11 19:14 ` [21/32] Remove global call sets: LRA Richard Sandiford
2019-09-30 15:29 ` Jeff Law
2019-10-04 18:03 ` H.J. Lu [this message]
2019-10-04 21:52 ` H.J. Lu
2019-10-05 13:33 ` Richard Sandiford
2019-09-11 19:14 ` [23/32] Remove global call sets: postreload-gcse.c Richard Sandiford
2019-09-25 16:08 ` Richard Sandiford
2019-09-29 22:22 ` Jeff Law
2019-09-11 19:14 ` [22/32] Remove global call sets: postreload.c Richard Sandiford
2019-09-29 21:33 ` Jeff Law
2019-09-11 19:15 ` [24/32] Remove global call sets: recog.c Richard Sandiford
2019-09-29 21:33 ` Jeff Law
2019-09-11 19:15 ` [25/32] Remove global call sets: regcprop.c Richard Sandiford
2019-09-29 21:34 ` Jeff Law
2019-09-11 19:16 ` [26/32] Remove global call sets: regrename.c Richard Sandiford
2019-09-29 22:25 ` Jeff Law
2019-09-11 19:16 ` [27/32] Remove global call sets: reload.c Richard Sandiford
2019-09-29 22:26 ` Jeff Law
2019-09-11 19:17 ` [00/32] Remove global call sets: rtlanal.c Richard Sandiford
2019-09-29 22:21 ` Jeff Law
2019-09-11 19:17 ` [29/32] Remove global call sets: sched-deps.c Richard Sandiford
2019-09-29 22:20 ` Jeff Law
2019-10-04 14:32 ` Christophe Lyon
2019-10-04 14:35 ` Richard Sandiford
2019-10-04 14:37 ` Christophe Lyon
2019-10-07 13:29 ` Christophe Lyon
2019-09-11 19:18 ` [31/32] Remove global call sets: shrink-wrap.c Richard Sandiford
2019-09-29 22:21 ` Jeff Law
2019-09-11 19:18 ` [30/32] Remove global call sets: sel-sched.c Richard Sandiford
2019-09-30 15:08 ` Jeff Law
2019-09-11 19:19 ` [32/32] Hide regs_invalidated_by_call etc Richard Sandiford
2019-09-29 22:22 ` Jeff Law
2019-09-12 20:42 ` [00/32] Support multiple ABIs in the same translation unit Steven Bosscher
2019-09-26 19:24 ` Dimitar Dimitrov
2019-09-27 8:58 ` Richard Sandiford
2019-10-01 2:09 ` build-failure for cris-elf with "[00/32] Support multiple ABIs in the same translation unit" Hans-Peter Nilsson
2019-10-01 7:51 ` Richard Sandiford
2019-10-01 10:58 ` Hans-Peter Nilsson
2019-10-06 8:45 [21/32] Remove global call sets: LRA Uros Bizjak
2019-10-06 14:32 ` Richard Sandiford
2019-10-07 6:04 ` Uros Bizjak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMe9rOpea=7YJ4XqKPpMNuGdoEWds1EZSXdah4THzqS70b+0Sg@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.sandiford@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).