SeaOfNodes / Simple

A Simple showcase for the Sea-of-Nodes compiler IR
Apache License 2.0
397 stars 30 forks source link

don't call peephole on node returned from idealize #117

Closed RobertObkircher closed 2 months ago

XmiliaH commented 2 months ago

I think that case should even be moved into compute.

RobertObkircher commented 2 months ago

Right, compute already does that. I guess it can also be removed from CProjNode in future chapters.

RobertObkircher commented 2 months ago

A potential problem with this change is that peephole now replaces with a new XCtrlNode() instead of Parser.XCTRL;

cliffclick commented 2 months ago

Minor inefficiency: "new XCtrlNode().peephole()" will return "Parser.XCTRL" after making the Node then GVN'ing it.