WLIR is premature - cripples downstream WLF
Bugzilla Link | 500 |
Created on | May 31, 2009 17:32 |
Resolution | FIXED |
Resolved on | Nov 15, 2012 21:10 |
Version | 1.00beta |
OS | Linux |
Architecture | PC |
Attachments | degenerate3.sac |
Extended Description
The attached degenerate3.sac shows a problem with WLIR: It pulls an invariant sel() out of the z WL, thereby making "copy" unavailable as a WLF foldeeWL candidate. This means that, instead of folding "copy" entirely out of existence, we generate the whole shebang, then index a lone scalar out of it. I am not sure of the proper action to take here. Some possible approaches:
- Defer WLIR until after cyc and saacyc are complete.
- Have WLIR refuse to move sel(... foldeeWL) ops out of WLs.
- Introduce Yet Another Optimization, to fold foldeeWLs into sel() operations. I suspect that the quickest and easiest thing to do, at least for now, is (2).