<div dir="ltr"><p dir="ltr">Hi,<br><br>For those that don't know I've submitted a proposal for this years GSoC.<br>I've proposed to implement value range propagation and loop unrolling in NIR.<br>Since I'm no expert on compilers I've read up on some litterature:<br><br>I started with "Constant propagation with conditional branches" (thanks Connor).<br>This paper describes an algorithm, "sparse conditional constant propagation",<br>that seems to be the defacto standard in compilers today.<br><br>I also found the paper;<br>"Accurate static branch prediction by value range propagation " (VRP).<br>This describes a value range propagation implementation based on SCCP.<br>(This also allows one to set heuristics to calculate educated guesses for the<br>probability of a certain branch, but that's probably more than we're interested in.)<br><br>There is also a GCC paper (with whatever licensing issues that may apply);<br>"A propagation engine for GCC".<br>They have a shared engine for doing all propagation passes.<br>It handles the worklists, and the logic to traverse these.<br>The implementing passes then supply callbacks to define the lattice rules.<br>They reply back if the instruction was interesting or not,<br>and the propagation engine basically handles the rest.<br><br>Maybe that's an interesting solution? Or it might not be worth the hassle?<br>We already have copy propagation, and with value range propagation <br>we probably don't want separate constant propagation?<br>(I'm hoping to write the pass so that it handles both constants and value ranges.)<br>The GCC guys have used this engine to get copy propagation that propagates<br>copies accross conditionals, maybe this makes such a solution more interesting?<br><br>Connor: I just remembered you saying something about your freedesktop<br>git repo, so I poked around some and found that you have already done<br>some work on VRP based on SCCP? How far did you get?<br><br>If we just want to make an SCCP inspired VRP pass then Connor has work in progress.<br>Finishing that, and loop unrolling, may not be enough work for GSoC?<br>Or maybe Connor wants to finish it of himself, and I should spend my time<br>implementing some other pass instead, alongside loop unrolling?<br><br>Realising Connor has partially started on this I thought it was a good<br>idea to get some feedback and ideas from others (if I need to change my proposal)<br>All suggestions, ideas and opinions are more than welcome.<br>Fire at will, I'm all ears =)<br><br>Regards,<br>Thomas</p>
</div>