ir_optimization.h revision 65122e9e8038488e8c586eb609e434a90188de27
16255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt/*
26255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * Copyright © 2010 Intel Corporation
36255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt *
46255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * Permission is hereby granted, free of charge, to any person obtaining a
56255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * copy of this software and associated documentation files (the "Software"),
66255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * to deal in the Software without restriction, including without limitation
76255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * the rights to use, copy, modify, merge, publish, distribute, sublicense,
86255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * and/or sell copies of the Software, and to permit persons to whom the
96255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * Software is furnished to do so, subject to the following conditions:
106255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt *
116255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * The above copyright notice and this permission notice (including the next
126255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * paragraph) shall be included in all copies or substantial portions of the
136255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * Software.
146255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt *
156255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
166255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
176255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
186255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
196255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
206255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
216255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * DEALINGS IN THE SOFTWARE.
226255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt */
236255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt
246255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt
256255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt/**
266255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * \file ir_dead_code.h
276255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt *
286255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt * Prototypes for optimization passes to be called by the compiler and drivers.
296255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt */
306255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholt
31bdd9b1f3ffa2a195d983816adfeca20480256119Eric Anholtbool do_constant_folding(exec_list *instructions);
3265122e9e8038488e8c586eb609e434a90188de27Eric Anholtbool do_constant_variable(exec_list *instructions);
3365122e9e8038488e8c586eb609e434a90188de27Eric Anholtbool do_constant_variable_unlinked(exec_list *instructions);
34bdd9b1f3ffa2a195d983816adfeca20480256119Eric Anholtbool do_copy_propagation(exec_list *instructions);
35bdd9b1f3ffa2a195d983816adfeca20480256119Eric Anholtbool do_dead_code(exec_list *instructions);
366255a1f4c6425aa311c90e9dc7fca41c34e8dc2bEric Anholtbool do_dead_code_local(exec_list *instructions);
37bdd9b1f3ffa2a195d983816adfeca20480256119Eric Anholtbool do_dead_code_unlinked(exec_list *instructions);
38bdd9b1f3ffa2a195d983816adfeca20480256119Eric Anholtbool do_function_inlining(exec_list *instructions);
39bdd9b1f3ffa2a195d983816adfeca20480256119Eric Anholtbool do_if_simplification(exec_list *instructions);
4049a5d5c4f5bf6e8d6ba344e8496d1d1fa0b4586dEric Anholtbool do_swizzle_swizzle(exec_list *instructions);
41b145e903694fa932ab1e0d955e889555193ab604Eric Anholtbool do_vec_index_to_swizzle(exec_list *instructions);
42