110 likes | 207 Views
Explore methods to optimize multimedia performance through vectorization, instruction sets, and loop unrolling. Learn about challenges and solutions in multimedia processor programming.
E N D
Compilation Techniques for Multimedia Processors Andreas Krall and Sylvain Lelait Technische Universitat Wien
Motivation • High processing power needed by multimedia applications • Special instruction sets for multimedia data • Implemented by special processors • Multimedia instruction set extensions • Visual instruction set(VIS) of UltraSPARC • Altivec extension of PowerPC • MMX extension of Pentium • MAX-2 instruction set of HP PA-RISC
Problems and Solutions • New functionality has not been exploited properly • Have to code in assembly language • Use provided system libraries • Call macros in high-level language • Compile a program coded in high-level language into multimedia instructions • Classic vectorization • Vectorization by loop unrolling
Classic Vectorization • Loop analysis • Loop normalization • Scalar expansion • Dependence analysis • Vectorization • Alignment management • Strip mining • Constant expansion • Lower iteration space • Lower alignment • Instruction selection and register allocation
Classic Vectorization • Loop analysis • Loop normalization • Scalar expansion • Dependence analysis • Vectorization • Alignment management • Strip mining • Constant expansion • Lower iteration space • Lower alignment • Instruction selection and register allocation
Classic Vectorization • Loop analysis • Loop normalization • Scalar expansion • Dependence analysis • Vectorization • Alignment management • Strip mining • Constant expansion • Lower iteration space • Lower alignment • Instruction selection and register allocation
Classic Vectorization • Loop analysis • Loop normalization • Scalar expansion • Dependence analysis • Vectorization • Alignment management • Strip mining • Constant expansion • Lower iteration space • Lower alignment • Instruction selection and register allocation
Vectorization by Loop Unrolling • Loop analysis • Compute unrolling degree • Loop unrolling • Dependence analysis • Dependence verification • Generation of vector instructions • Alignment management • Lower iteration space • Lower alignment • Instruction selection and register allocation
Vectorization by Loop Unrolling • Loop analysis • Compute unrolling degree • Loop unrolling • Dependence analysis • Dependence verification • Generation of vector instructions • Alignment management • Lower iteration space • Lower alignment • Instruction selection and register allocation
Vectorization by Loop Unrolling • Loop analysis • Compute unrolling degree • Loop unrolling • Dependence analysis • Dependence verification • Generation of vector instructions • Alignment management • Lower iteration space • Lower alignment • Instruction selection and register allocation