[Mesa-dev] Common Subexpression Elimination

Vincent vljn at ovi.com
Sat Jul 16 08:28:14 PDT 2011


Hi,

I wrote an optimisation pass that perform CSE (that is, it spots 
expressions that appears twice or more, and factor them in a temporary 
to avoid recalculation).
This is my first patch to Mesa, I would like to receive feedback : case 
where the algorithm does not work, crashes, ...
I tried to follow coding style, using exec_list*, ralloced objects...
The algorithm currently only spot binary expressions (that is x + y, x * 
y, ...) but unary expression (exp(x), ln(x)...) should follow soon.

Regards,
Vincent.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cse.patch
Type: text/x-patch
Size: 17485 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110716/f579e7fd/attachment.bin>


More information about the mesa-dev mailing list