Branch: Tag:

2000-04-27

2000-04-27 02:12:05 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

more optimizations

Rev: src/peep.in:1.30

1:   // - // $Id: peep.in,v 1.29 2000/04/25 09:32:46 hubbe Exp $ + // $Id: peep.in,v 1.30 2000/04/27 02:12:05 hubbe Exp $   //      NOP :
64:   NOT BRANCH_WHEN_NON_ZERO: BRANCH_WHEN_ZERO($2a)   NOT BRANCH_WHEN_ZERO: BRANCH_WHEN_NON_ZERO($2a)    + POP_VALUE RETURN_0: RETURN_0 + POP_N_ELEMS RETURN_0: RETURN_0 + POP_VALUE RETURN_1: RETURN_1 + POP_N_ELEMS RETURN_1: RETURN_1 +    BRANCH !LABEL : BRANCH($1a)   RETURN !LABEL : RETURN   RETURN_0 !LABEL : RETURN_0
252:   BasicBranch0(BRANCH_WHEN_NON_ZERO, BRANCH_AND_POP_WHEN_NON_ZERO)   BasicBranch0(BRANCH_WHEN_ZERO, BRANCH_AND_POP_WHEN_ZERO)    + #define SimpleBranch(Sequence,X) \ +  Sequence BRANCH_WHEN_ZERO Sequence : Sequence BRANCH_AND_POP_WHEN_ZERO ( X ) ; \ +  Sequence BRANCH_WHEN_ZERO MARK Sequence : Sequence BRANCH_AND_POP_WHEN_ZERO ( X ) MARK_X(1) ; +  + SimpleBranch( LOCAL_ARROW($1a, $1b), $2a ) + SimpleBranch( LOCAL_ARROW($1a, $1b) ARROW($2a), $3a ) + SimpleBranch( LOCAL_ARROW($1a, $1b) ARROW($2a) ARROW($3a), $4a ) + SimpleBranch( LOCAL_ARROW($1a, $1b) ARROW($2a) ARROW($3a) ARROW($4a), $5a ) +  + SimpleBranch( GLOBAL($1a) ARROW ($2a), $3a ) +    LOCAL ASSIGN_LOCAL_AND_POP : LOCAL_2_LOCAL($2a,$1a)   GLOBAL ASSIGN_LOCAL_AND_POP : GLOBAL_2_LOCAL($1a,$2a)   LOCAL ASSIGN_GLOBAL_AND_POP : LOCAL_2_GLOBAL($2a,$1a)
279:         RECUR RETURN: TAIL_RECUR ($1a) + MARK TAIL_RECUR : BRANCH ($1a) +  + ASSIGN_LOCAL BRANCH_WHEN_ZERO 2_LOCALS(,$1a) BRANCH_WHEN_EQ : ASSIGN_LOCAL BRANCH_AND_POP_WHEN_ZERO($2a) LOCAL($3a) BRANCH_WHEN_EQ($4a) + ASSIGN_LOCAL BRANCH_WHEN_ZERO 2_LOCALS(,$1a) BRANCH_WHEN_NE : ASSIGN_LOCAL BRANCH_AND_POP_WHEN_ZERO($2a) LOCAL($3a) BRANCH_WHEN_NE($4a) +  + /* This will facilitate other optimizations I hope */ + CLEAR_LOCAL MARK LOCAL [ $1a != $3a ] : MARK LOCAL($3a) CLEAR_LOCAL($1a) +  + /* The result of this optimization could be reordered... */ + CLEAR_LOCAL MARK LOCAL($1a) : MARK CLEAR_LOCAL($1a) CONST0