Path: blob/21.2-virgl/src/gallium/drivers/r300/compiler/radeon_emulate_loops.h
4574 views
/*1* Copyright 2010 Tom Stellard <[email protected]>2*3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining6* a copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sublicense, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial15* portions of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,18* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.20* IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE21* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION22* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION23* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25*/2627#ifndef RADEON_EMULATE_LOOPS_H28#define RADEON_EMULATE_LOOPS_H2930#define MAX_ITERATIONS 83132struct radeon_compiler;3334struct loop_info {35struct rc_instruction * BeginLoop;36struct rc_instruction * Cond;37struct rc_instruction * If;38struct rc_instruction * Brk;39struct rc_instruction * EndIf;40struct rc_instruction * EndLoop;41};4243struct emulate_loop_state {44struct radeon_compiler * C;45struct loop_info * Loops;46unsigned int LoopCount;47unsigned int LoopReserved;48};4950void rc_transform_loops(struct radeon_compiler *c, void *user);5152void rc_unroll_loops(struct radeon_compiler * c, void *user);5354void rc_emulate_loops(struct radeon_compiler * c, void *user);5556#endif /* RADEON_EMULATE_LOOPS_H */575859