lima/gpir: add few optimization passes
This is respin of !2315 (closed)
Non-related rework of regalloc is dropped.
I amended DCE pass to drop dead reg writes as well since these are confusing regalloc. Since they have no users they are never live, so they don't conflict with any regs and as result regalloc may assign any reg to it overwriting another live value.