ir icon indicating copy to clipboard operation
ir copied to clipboard

Implement e-SSA PI nodes

Open arnaud-lb opened this issue 11 months ago • 0 comments

This implements e-SSA PI constraint nodes, without range propagation.

This uses the folding engine to replace comparison ops into constants when possible, and in turn the SCCP engine can elide IF/SWITCH/GUARD. I only implemented folding for EQ right now, but I will add other ops. I also did not add support for symbolic ranges.

PI node signature has the form PI(def, RANGE(min, max)) (op2 is a RANGE op). It should be possible to change this to PI(def, min, max), but the folding engine supports only two operands currently.

PI nodes must be added manually, like PHI nodes. They are replaced by COPY ops after SCCP so that other passes do not have to be aware of them.

arnaud-lb avatar Mar 26 '24 14:03 arnaud-lb