R600: AMDILCFGStructurizer simplification

Vincent Lejeune vljn at ovi.com
Fri Jul 19 09:31:11 PDT 2013


Hi,

this serie is simplifying our AMDILCFGStructurizer pass currently used by non SI target.
I removed all the templates (there was only a single template instanciation, the original
author probably wanted the code to work on LLVM IR as well as on Machine Code but it wasn't
implemented) and removed some code by assuming that every loop has a single exit.
While it may looks like a limitation from previous situation, the pass generated wrong code 

(it added vreg assignement after regalloc) and made llvm crash. Actually the simplified code is even able
to solve some TFB piglit test crashes.
I also took the opportunity to make the code more compliant with llvm code style standard (Uppercase variable,
 brace in single line loops...)


I also added a patch that makes triangle if/then/else pattern correctly lowered, ie sparing an extra THEN...ENDIF
constructions, which should spare a couple of cycle in resulting code.

Vincent.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-R600-Replace-legacy-debug-code-in-AMDILCFGStructuriz.patch
Type: text/x-patch
Size: 32041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130719/13e6a047/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-R600-Simplify-AMDILCFGStructurize-by-removing-templa.patch
Type: text/x-patch
Size: 154107 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130719/13e6a047/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-R600-Don-t-emit-empty-then-clause-and-use-alu_pop_af.patch
Type: text/x-patch
Size: 12393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130719/13e6a047/attachment-0002.bin>


More information about the llvm-commits mailing list