This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Classification Improvements to ARM Sched-Models. NFCI.
ClosedPublic

Authored by javed.absar on Dec 31 2016, 2:34 AM.

Details

Summary

This is a series of patches to enable adding of machine sched models for ARM processors easier and compact. They define new sched-readwrites for groups of ARM instructions. This has been missing so far, and as a consequence, machine scheduler models for individual sub-targets have tended to be larger than they needed to be. These patches should help write schedulers better and faster in the future for ARM sub-targets. The current patch focuses on floating-point instructions.

Diff Detail

Event Timeline

javed.absar retitled this revision from to [ARM] Classification Improvements to ARM Sched-Models. NFCI..
javed.absar updated this object.
javed.absar added reviewers: rengolin, jmolloy.
javed.absar added a subscriber: llvm-commits.

Hi Renato/James:
Gentle reminder on this review.
Thanks.

rengolin edited edge metadata.Jan 6 2017, 4:12 AM

Hi Javed,

There's a lot of repetition in this patch. Can't you group the similar latencies together?

Cheers,
Renato

Hi Renato:

Thanks. OK, I will collapse the schedwrites into one wherever sub-targets, which currently have sched-model in place, do not differentiate.

I tried not to club too many of the sched-defs into one bucket because then sub-targets wouldn't be able to specify different latencies/resources if there was indeed a difference in the pipeline behavior for different instruction classes (e.g. between MUL32 and MUL64).
Best Regards, Javed.

I tried not to club too many of the sched-defs into one bucket because then sub-targets wouldn't be able to specify different latencies/resources if there was indeed a difference in the pipeline behavior for different instruction classes (e.g. between MUL32 and MUL64).

I see where you're coming from, but I'd rather have that differentiation done by the sub-architectures when they need, than just explode the combinations now, and having to apply larger patches every time one sub-arch needs one cost changed. :)

--renato

javed.absar updated this revision to Diff 83556.Jan 8 2017, 5:44 AM
javed.absar edited edge metadata.

Hi Renato:

Based on your feedback, I have removed sub-categories of of FPCVT and FPMOV. This removes the duplication you mentioned about for the sub-target. Please have a look and let me know if this is ok.
Thanks
Javed

rengolin added inline comments.Jan 8 2017, 9:27 AM
lib/Target/ARM/ARMScheduleSwift.td
307

useless whitespace change

607–608

don't comment out changes. If it's irrelevant, delete. If not, uncomment.

javed.absar updated this revision to Diff 83595.Jan 9 2017, 1:48 AM

Hi Renato:
Thanks. I have removed the commented lines and unnecessary white-space, as you recommended.
Best Regards
Javed

rovka edited edge metadata.Jan 11 2017, 8:07 AM

Hi Javed,

The latest diff doesn't look right, could you re-upload it please? Also, it would be great if you could include more context.

Thanks,
Diana

javed.absar edited edge metadata.
javed.absar marked 2 inline comments as done.

Hi Diana:
Please find re-uploaded and with more context. Something went wrong with previous uploading. Apologies for that.

Thanks and Best Regards
Javed

Hi Diana:
Gentle reminder. Please let me know if you are ok with this patch.
best regards

rovka added a comment.Jan 19 2017, 7:58 AM

Hi Javed,

Sorry about the delay, I was out of office for a few days. Comments below.

Cheers,
Diana

lib/Target/ARM/ARMInstrVFP.td
402

Why are half precision division and multiplication modeled the same as single precision, but half precision add/sub/sqrt aren't?

lib/Target/ARM/ARMSchedule.td
58

Typo: integer

lib/Target/ARM/ARMScheduleA9.td
1948

Why isn't this just a SchedAlias for A9WriteFDivS?

2554

Missed a spot.

Hi Diana:
I have fixed the issues you correctly pointed out. Thanks for that.
Best Regards
Javed

Removing the commented obsolete def. Missed it earlier.

rovka accepted this revision.Jan 23 2017, 12:48 AM

LGTM, thanks.

This revision is now accepted and ready to land.Jan 23 2017, 12:48 AM
This revision was automatically updated to reflect the committed changes.