which moves the outer @code{plus} operation to the inner arms
of the @code{vec_cond} expression but only if the actual plus
-operations both simplify.
+operations both simplify. Note this is currently only supported
+for code generation targeting @code{GIMPLE}.
As intermediate conversions are often optional there is a way to
avoid the need to repeat patterns both with and without such
class parser
{
public:
- parser (cpp_reader *);
+ parser (cpp_reader *, bool gimple);
private:
const cpp_token *next ();
void finish_match_operand (operand *);
cpp_reader *r;
+ bool gimple;
vec<c_expr *> active_ifs;
vec<vec<user_id *> > active_fors;
hash_set<user_id *> *oper_lists_set;
&& token->type == CPP_NOT
&& !(token->flags & PREV_WHITE))
{
+ if (!gimple)
+ fatal_at (token, "forcing simplification to a leaf is not supported "
+ "for GENERIC");
eat_token (CPP_NOT);
e->force_leaf = true;
}
/* Main entry of the parser. Repeatedly parse outer control structures. */
-parser::parser (cpp_reader *r_)
+parser::parser (cpp_reader *r_, bool gimple_)
{
r = r_;
+ gimple = gimple_;
active_ifs = vNULL;
active_fors = vNULL;
simplifiers = vNULL;
#include "internal-fn.def"
/* Parse ahead! */
- parser p (r);
+ parser p (r, gimple);
if (gimple)
write_header (stdout, "gimple-match-head.c");