On 12/10/2021 8:06 AM, Robin Dapp wrote:
Hi Jeff,
I'd generally prefer to refactor the bits between the restart label and
the goto restart into a function and call it twice, passing in the
additional bits to allow for better costing. Can you look into that?
If it's going to be major surgery, then the goto approach will be OK.
I transplanted the loop into a separate function
"noce_convert_multiple_sets_1" (for the lack of a better name right
now). I guess an argument could be made about also moving
+ rtx cc_cmp = cond_exec_get_condition (jump);
+ rtx rev_cc_cmp = cond_exec_get_condition (jump, /* get_reversed */ true);
into the function and not care about traversing all instructions
twice/four times (will not be more than a few anyway) but I did not do
that for now.
Does this look better? Not fully tested yet everywhere but a test suite
run on s390 looked good.
I think it's looks better. One might argue that a structure rather than
a half-dozen named arguments or a class would be even better, but I
think that can wait for a full class-ification of that file.
You probably should move the prototype for noce_convert_multiple_set_1
into the .c file. It's static, no no need to expose it in the .h file
AFAICT. OK with that change.
jeff