Hi All, Here is the last part of patch which is related to vectorization improvements, namely
1. New sub-phase is added which delete dead predicate computations (such code can prevent loop vectorization since dead computation are not part of bool pattern tree). It is invoked only under FLAG_FORCE_VECTORIZE. 2. New sub-phase is added to provide single uses in tree correspondent to bool pattern (it takes place when the same predicate is used for PHI-node predication and predicated memory access through 'mask'). To do it some code replication is used. It is invoked only under FLAG_FORCE_VECTORIZE. 3. I added simple optimization for predicate_mem_writes - do not generate new mask if it has been produced for given size. 4. simple change was made in fold_build_cond_expr to simplify predicate of kind r != 0 where r has boolean type to simply 'r' which is accepted by bool pattern recognition. ChangeLog: 2014-11-12 Yuri Rumyantsev <ysrum...@gmail.com> * tree-if-conv.c (fold_build_cond_expr): Add conversion COND to SSA_NAME if it is comparison r != 0 and r has boolean type. (predicate_mem_writes): Introduce mask_vec to save mask correspondent to given size. Do not generate new mask if it exists for given size. (ifcvt_split_def_stmt): New function. (ifcvt_walk_pattern_tree): New function. (stmt_is_root_of_bool_pattern): New function. (ifcvt_repair_bool_pattern): New function. (ifcvt_local_dce): New function. (tree_if_conversion): Add calls of ifcvt_local_dce and ifcvt_repair_bool_pattern if FLAG_FORCE_VECTORIZE is true.
if-conv.patch3
Description: Binary data