Mercurial > hg > CbC > CbC_gcc
comparison gcc/gimple-match.h @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* Gimple simplify definitions. | 1 /* Gimple simplify definitions. |
2 | 2 |
3 Copyright (C) 2011-2018 Free Software Foundation, Inc. | 3 Copyright (C) 2011-2020 Free Software Foundation, Inc. |
4 Contributed by Richard Guenther <rguenther@suse.de> | 4 Contributed by Richard Guenther <rguenther@suse.de> |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
8 GCC is free software; you can redistribute it and/or modify it under | 8 GCC is free software; you can redistribute it and/or modify it under |
41 }; | 41 }; |
42 | 42 |
43 /* Represents the condition under which an operation should happen, | 43 /* Represents the condition under which an operation should happen, |
44 and the value to use otherwise. The condition applies elementwise | 44 and the value to use otherwise. The condition applies elementwise |
45 (as for VEC_COND_EXPR) if the values are vectors. */ | 45 (as for VEC_COND_EXPR) if the values are vectors. */ |
46 struct gimple_match_cond | 46 class gimple_match_cond |
47 { | 47 { |
48 public: | |
48 enum uncond { UNCOND }; | 49 enum uncond { UNCOND }; |
49 | 50 |
50 /* Build an unconditional op. */ | 51 /* Build an unconditional op. */ |
51 gimple_match_cond (uncond) : cond (NULL_TREE), else_value (NULL_TREE) {} | 52 gimple_match_cond (uncond) : cond (NULL_TREE), else_value (NULL_TREE) {} |
52 gimple_match_cond (tree, tree); | 53 gimple_match_cond (tree, tree); |
77 return gimple_match_cond (cond, NULL_TREE); | 78 return gimple_match_cond (cond, NULL_TREE); |
78 } | 79 } |
79 | 80 |
80 /* Represents an operation to be simplified, or the result of the | 81 /* Represents an operation to be simplified, or the result of the |
81 simplification. */ | 82 simplification. */ |
82 struct gimple_match_op | 83 class gimple_match_op |
83 { | 84 { |
85 public: | |
84 gimple_match_op (); | 86 gimple_match_op (); |
85 gimple_match_op (const gimple_match_cond &, code_helper, tree, unsigned int); | 87 gimple_match_op (const gimple_match_cond &, code_helper, tree, unsigned int); |
86 gimple_match_op (const gimple_match_cond &, | 88 gimple_match_op (const gimple_match_cond &, |
87 code_helper, tree, tree); | 89 code_helper, tree, tree); |
88 gimple_match_op (const gimple_match_cond &, | 90 gimple_match_op (const gimple_match_cond &, |
103 void set_op (code_helper, tree, tree, tree, tree, tree, tree); | 105 void set_op (code_helper, tree, tree, tree, tree, tree, tree); |
104 void set_value (tree); | 106 void set_value (tree); |
105 | 107 |
106 tree op_or_null (unsigned int) const; | 108 tree op_or_null (unsigned int) const; |
107 | 109 |
110 bool resimplify (gimple_seq *, tree (*)(tree)); | |
111 | |
108 /* The maximum value of NUM_OPS. */ | 112 /* The maximum value of NUM_OPS. */ |
109 static const unsigned int MAX_NUM_OPS = 5; | 113 static const unsigned int MAX_NUM_OPS = 5; |
110 | 114 |
111 /* The conditions under which the operation is performed, and the value to | 115 /* The conditions under which the operation is performed, and the value to |
112 use as a fallback. */ | 116 use as a fallback. */ |
329 | 333 |
330 extern tree (*mprts_hook) (gimple_match_op *); | 334 extern tree (*mprts_hook) (gimple_match_op *); |
331 | 335 |
332 bool gimple_simplify (gimple *, gimple_match_op *, gimple_seq *, | 336 bool gimple_simplify (gimple *, gimple_match_op *, gimple_seq *, |
333 tree (*)(tree), tree (*)(tree)); | 337 tree (*)(tree), tree (*)(tree)); |
334 bool gimple_resimplify1 (gimple_seq *, gimple_match_op *, tree (*)(tree)); | |
335 bool gimple_resimplify2 (gimple_seq *, gimple_match_op *, tree (*)(tree)); | |
336 bool gimple_resimplify3 (gimple_seq *, gimple_match_op *, tree (*)(tree)); | |
337 bool gimple_resimplify4 (gimple_seq *, gimple_match_op *, tree (*)(tree)); | |
338 bool gimple_resimplify5 (gimple_seq *, gimple_match_op *, tree (*)(tree)); | |
339 tree maybe_push_res_to_seq (gimple_match_op *, gimple_seq *, | 338 tree maybe_push_res_to_seq (gimple_match_op *, gimple_seq *, |
340 tree res = NULL_TREE); | 339 tree res = NULL_TREE); |
341 void maybe_build_generic_op (gimple_match_op *); | 340 void maybe_build_generic_op (gimple_match_op *); |
342 | 341 |
343 | 342 |