Bug 38711 - ira should not be using df-lr except at -O1.
Summary: ira should not be using df-lr except at -O1.
Status: REOPENED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords: patch, ra
Depends on: 39607 54961 54993 55046
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-03 00:41 UTC by Kenneth Zadeck
Modified: 2021-10-29 01:39 UTC (History)
2 users (show)

See Also:
Host: all
Target: all
Build: all
Known to work:
Known to fail:
Last reconfirmed: 2019-03-01 00:00:00


Attachments
Use DF_LIVE where possible in IRA (2.57 KB, patch)
2012-10-12 22:34 UTC, Steven Bosscher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Zadeck 2009-01-03 00:41:34 UTC
Ira should be using the DF-LIVE sets, which are smaller than the DF-LR sets when they are available (typically at O2 and above).

The proper sets can be conveniently accessed using the df_get_live_[in,out] functions which use DF-LIVE if it is available and fall back to DF-LR if it is not.
Comment 1 Steven Bosscher 2012-10-12 22:34:49 UTC
Created attachment 28438 [details]
Use DF_LIVE where possible in IRA

Only in reload1.c should we continue to use DF_LR
Bootstrapped on x86_64-unknown-linux-gnu.
Comment 2 Steven Bosscher 2012-10-14 19:31:02 UTC
Author: steven
Date: Sun Oct 14 19:30:59 2012
New Revision: 192440

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192440
Log:
	PR rtl-optimization/38711
	* df.h (df_get_live_out, df_get_live_in): Make static inline functions.
	* df-problems.c (df_get_live_out, df_get_live_in): Moved to df.h.
	* ira-lives.c (process_bb_node_lives): Use df_get_live_out instead of
	DF_LR_OUT.
	* ira-build.c (create_bb_allocnos): Likewise.
	(create_loop_allocnos): Likewise, and use df_get_live_in instead of
	DF_LR_IN.
	* ira-emit.c (generate_edge_moves): Likewise.
	(add_ranges_and_copies): Likewise.
	* ira-color.c (ira_loop_edge_freq): Use df_get_live_out instead of
	DF_LR_OUT, and df_get_live_in instead of DF_LR_IN.
	* ira.c (mark_elimination): Update DF_LR and DF_LIVE.
	(build_insn_chain): Use df_get_live_out instead of DF_LR_OUT.
	(do_reload): Remove the DF_LIVE problem for -O1.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/df-problems.c
    trunk/gcc/df.h
    trunk/gcc/ira-build.c
    trunk/gcc/ira-color.c
    trunk/gcc/ira-emit.c
    trunk/gcc/ira-lives.c
    trunk/gcc/ira.c
Comment 3 Steven Bosscher 2012-10-14 20:35:41 UTC
Fixed as of trunk r192440, for GCC 4.8.
Comment 4 Steven Bosscher 2012-10-28 11:52:16 UTC
Author: steven
Date: Sun Oct 28 11:52:11 2012
New Revision: 192890

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192890
Log:
	PR rtl-optimization/38711
	* ira.c (ira): Remove DF_LIVE if the problem is in the stack.
	(do_reload): Add it back at the end for -O2 and higher.

	* function.c (thread_prologue_and_epilogue_insns): Use
	REG_SET_TO_HARD_REG_SET instead of CLEAR_HARD_REG_SET and
	reg_set_to_hard_reg_set.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/function.c
    trunk/gcc/ira.c
Comment 5 Steven Bosscher 2012-10-28 11:53:01 UTC
Much of GCC is still not ready for this.
Comment 6 Jakub Jelinek 2013-03-22 14:44:24 UTC
GCC 4.8.0 is being released, adjusting target milestone.
Comment 7 Jakub Jelinek 2013-05-31 10:58:34 UTC
GCC 4.8.1 has been released.
Comment 8 Jakub Jelinek 2013-10-16 09:50:22 UTC
GCC 4.8.2 has been released.
Comment 9 Eric Gallager 2018-11-06 06:29:26 UTC
(In reply to Steven Bosscher from comment #5)
> Much of GCC is still not ready for this.

What about now?
Comment 10 Steven Bosscher 2019-03-01 13:02:21 UTC
(In reply to Eric Gallager from comment #9)

Not much has changed. There's LRA now, so for targets using LRA
things may now work. Worth a try if someone's interested.
Comment 11 Steven Bosscher 2019-03-05 08:29:31 UTC
Not working on this => unassigned...
Comment 12 Eric Gallager 2019-06-05 13:36:26 UTC
(In reply to Steven Bosscher from comment #10)
> (In reply to Eric Gallager from comment #9)
> 
> Not much has changed. There's LRA now, so for targets using LRA
> things may now work. 

That's most targets...