Bugzilla – Bug 315303
[PATCH] Recomputate liveness ranges on second scan
Last modified: 2007-09-15 21:24:46 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".