Bug 315303 (MONO60909) - [PATCH] Recomputate liveness ranges on second scan
Summary: [PATCH] Recomputate liveness ranges on second scan
Status: RESOLVED FIXED
Alias: MONO60909
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-30 03:17 UTC by Ben Maurer
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
patch (672 bytes, patch)
2004-06-30 03:17 UTC, Thomas Wiest
Details | Diff
patch to get stats about the % of variables we assign to regvars (2.12 KB, patch)
2004-07-03 20:08 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:44:37 UTC


---- Reported by bmaurer@users.sf.net 2004-06-29 20:17:37 MST ----

If liveness is recomputated we need to reset the information
for each variable. This way, if the liveness range has been narrowed
by optimizations that happened after the last computation, we can return
a smaller range.

For example, if you have

{
	int i = 0;
	
	// Tons of code that does not affect i
	
	i = foo ();
	...
}

i = 0 is dead code and will be removed by SSA. However, when
linear scan gets to the code, i will still appear to be live
throughout the entire block. This prevents good register allocation.



---- Additional Comments From bmaurer@users.sf.net 2004-06-29 20:17:57 MST ----

Created an attachment (id=166369)
patch




---- Additional Comments From bmaurer@users.sf.net 2004-07-03 13:08:05 MST ----

Created an attachment (id=166370)
patch to get stats about the % of variables we assign to regvars




---- Additional Comments From bmaurer@users.sf.net 2004-07-03 13:08:34 MST ----

I attached a little patch to give info about the effectiveness of this
change.



---- Additional Comments From bmaurer@users.sf.net 2004-07-03 13:14:57 MST ----

Stats from the above patch on --compile-all mscorlib.dll

Before:
     -O=deadce       68%
     -O=deadce,loop  47%
After
     -O=deadce       72%
     -O=deadce,loop  52%

From --compile-all mcs.exe

Before:
     -O=deadce       72%
     -O=deadce,loop  42%
After
     -O=deadce       78%
     -O=deadce,loop  49%



---- Additional Comments From lupus@ximian.com 2004-07-06 08:53:16 MST ----

Please commit, thanks.



---- Additional Comments From bmaurer@users.sf.net 2004-07-06 12:01:14 MST ----

Done.

Imported an attachment (id=166369)
Imported an attachment (id=166370)

Unknown operating system unknown. Setting to default OS "Other".