fix scheduling antideps
Mike Stump
mikestump@comcast.net
Tue Dec 15 18:50:00 GMT 2015
On Dec 11, 2015, at 6:09 AM, Jeff Law <law@redhat.com> wrote:
> On 12/11/2015 02:22 AM, Eric Botcazou wrote:
>>> This patch allows a target to increase the cost of anti-deps to better
>>> reflect the actual cost on the machine.
>>
>> But it can already do it via the TARGET_SCHED_ADJUST_COST hook, can't it?
> And can't this be done with define_bypass as well?
if (dep_type == REG_DEP_ANTI)
cost = 0;
else if (dep_type == REG_DEP_OUTPUT)
{
cost = (insn_default_latency (insn)
- insn_default_latency (used));
if (cost <= 0)
cost = 1;
}
else if (bypass_p (insn))
cost = insn_latency (insn, used);
I don’t see how if the first case is true, one gets into the third without code mods. I opted for the adjust_cost_2 hook.
More information about the Gcc-patches
mailing list