]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/genmatch.c
Make genmatch transform failure handling more consistent
authorRichard Biener <rguenther@suse.de>
Wed, 5 Aug 2020 10:00:07 +0000 (12:00 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 5 Aug 2020 10:04:18 +0000 (12:04 +0200)
commitf0699540f37e2550974f9049778a42a634062c0b
tree4b2bf40f27ee4dce0a05d0b68082c20c02988699
parent9f3abfb84e2a7ca115b0550c32308b5ada3e6a46
Make genmatch transform failure handling more consistent

Currently whether a fail during the transform stage is fatal or
whether following patterns are still considers is a bit random
depending on whether the pattern is wrapped in a for for example.
The follwing makes it consistent by replacing early returns with
gotos to the end of the pattern processing.

2020-08-05  Richard Biener  <rguenther@suse.de>

* genmatch.c (fail_label): New global.
(expr::gen_transform): Branch to fail_label instead of
returning.  Fix indent of call argument checking.
(dt_simplify::gen_1): Compute and emit fail_label, branch
to it instead of returning early.
gcc/genmatch.c