On Sat, Jul 26, 2014 at 11:20 PM, Prathamesh Kulkarni <bilbotheelffri...@gmail.com> wrote: > Hi, > This patch adds support for outer-if expressions. > > Couple of issues: > a) Doesn't interop with for-pattern, since we don't replace identifier > in c-expr yet, > and this gets more complicated with addition of outer-if.
Does it? Well, we'll see. > b) I removed ifexpr-locations for now. I am not sure where to output > if-expr locations > when there are multiple if-exprs (one outer and one inner). I'd say we'd use multiple locations, thus record a vector of if-expr, location tuples. Applied. Thanks, Richard. > * genmatch.c (simplify::ifexpr): Remove. > (simplify::ifexpr_location): Likewise. > (simplify::simplify): Adjust to changes in simplify and > add parameter ifexpr_vec_. > (dt_simplify::gen_gimple): Adjust to changes in simplify. > (dt_simplify::gen_generic): Likewise. > (parse_if): New function. > (parse_pattern): Add call to parse_if. > > * match.pd: Use outer-if for plus-minus patterns. > > Thanks, > Prathamesh