On 09/17/2015 11:52 AM, Simon Dardis wrote:
The profitability of using an ordinary branch over a delay slot branch
depends on how the delay slot is filled. If a delay slot can be filled from
an instruction preceding the branch or instructions proceeding that must be
executed on both sides then it is profitable to use a delay slot branch.

For cases when instructions are chosen from one side of the branch,
the proposed optimization strategy is to not speculatively execute
instructions when ordinary branches could be used. Performance-wise
this avoids executing instructions which the eager delay filler picked
wrongly.

Since most branches have a compact form disabling the eager delay filler
should be no worse than altering it not to fill delay slots in this case.

Ok, so in that case I think the patch would be reasonable if the target hook was named appropriately to say something like don't speculate when filling delay slots. It looks like fill_eager_delay_slots always speculates, so you needn't change your approach in reorg.c. Possibly place the hook after rtx_cost/address_cost in target.def since it's cost related.


Bernd

Reply via email to