On 07/17/2013 07:18 PM, David Malcolm wrote:
I've never been a fan of having unmatched braces inside macros; though I guess I can live with it particularly since it'll help catch an unmatched push/pop.gcc/ * passes.c (init_optimization_passes): Introduce macros for constructing the tree of passes (INSERT_PASSES_AFTER, PUSH_INSERT_PASSES_WITHIN, POP_INSERT_PASSES, TERMINATE_PASS_LIST). --- gcc/passes.c | 108 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 56 insertions(+), 52 deletions(-)diff --git a/gcc/passes.c b/gcc/passes.c index 761f030..6ca4134 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -1282,13 +1282,26 @@ init_optimization_passes (void) { struct opt_pass **p; +#define INSERT_PASSES_AFTER(PASS) \ + p = &(PASS); + +#define PUSH_INSERT_PASSES_WITHIN(PASS) \ + { \ + struct opt_pass **p = &(PASS).pass.sub; + +#define POP_INSERT_PASSES() \ + } +
OK for the trunk. jeff
