ir_optimization.h revision 49a5d5c4f5bf6e8d6ba344e8496d1d1fa0b4586d
1d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.com/* 2d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.com * Copyright © 2010 Intel Corporation 3d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.com * 4d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.com * Permission is hereby granted, free of charge, to any person obtaining a 5d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.com * copy of this software and associated documentation files (the "Software"), 6d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.com * to deal in the Software without restriction, including without limitation 7d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.com * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.com * and/or sell copies of the Software, and to permit persons to whom the 95a105ff05303ac82a867b8b84a1edd145bd46218jvanverth * Software is furnished to do so, subject to the following conditions: 10605dd0fbce9dbb2a0d3313e13e161f2bd54870d7egdaniel * 11eb2a6761654307e8aeeeaabdd63c6bf9ab0411e9joshualitt * The above copyright notice and this permission notice (including the next 1221deace8efc8e167d8626187ef0e6b4c241324b6jvanverth * paragraph) shall be included in all copies or substantial portions of the 13eb2a6761654307e8aeeeaabdd63c6bf9ab0411e9joshualitt * Software. 1421deace8efc8e167d8626187ef0e6b4c241324b6jvanverth * 15b0a8a377f832c59cee939ad721e1f87d378b7142joshualitt * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.com * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.com * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18249af15fb82833d2274850c589812b6e69df0033joshualitt * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19eb2a6761654307e8aeeeaabdd63c6bf9ab0411e9joshualitt * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.com * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 2121deace8efc8e167d8626187ef0e6b4c241324b6jvanverth * DEALINGS IN THE SOFTWARE. 2224ba00825092be0d400074e0121ffc7221950dd9jvanverth */ 232d2a68c51b4a71bd60760510bf2b2e58bc9890b2jvanverth 249b98932adaceb7ad0a617ade16616923f6bffe84joshualitt 259b98932adaceb7ad0a617ade16616923f6bffe84joshualitt/** 269b98932adaceb7ad0a617ade16616923f6bffe84joshualitt * \file ir_dead_code.h 27290c09b8bbd8d221d363150e2ce87158f4668df0joshualitt * 289b98932adaceb7ad0a617ade16616923f6bffe84joshualitt * Prototypes for optimization passes to be called by the compiler and drivers. 299b98932adaceb7ad0a617ade16616923f6bffe84joshualitt */ 30249af15fb82833d2274850c589812b6e69df0033joshualitt 31d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.combool do_constant_folding(exec_list *instructions); 32eb2a6761654307e8aeeeaabdd63c6bf9ab0411e9joshualittbool do_copy_propagation(exec_list *instructions); 3387f48d997ec29e5eeaa7567355775e93465dd60djoshualittbool do_dead_code(exec_list *instructions); 349b98932adaceb7ad0a617ade16616923f6bffe84joshualittbool do_dead_code_local(exec_list *instructions); 359564ce60a657acce89fb956deb8645b324eaad1ejvanverthbool do_dead_code_unlinked(exec_list *instructions); 3621deace8efc8e167d8626187ef0e6b4c241324b6jvanverthbool do_function_inlining(exec_list *instructions); 379564ce60a657acce89fb956deb8645b324eaad1ejvanverthbool do_if_simplification(exec_list *instructions); 389564ce60a657acce89fb956deb8645b324eaad1ejvanverthbool do_swizzle_swizzle(exec_list *instructions); 39d830d13c27437b4677a4a1abfa866d98dc2d2ab9jvanverth@google.combool do_vec_index_to_swizzle(exec_list *instructions); 4036352bf5e38f45a70ee4f4fc132a38048d38206dmtklein