This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add -aarch64-insert-extract-base-cost
ClosedPublic

Authored by peterwaller-arm on May 3 2022, 2:48 AM.

Details

Summary

The new flag -aarch64-insert-extract-base-cost can be used to
set the value of AArch64Subtarget::getVectorInsertExtractBaseCost(),
for the purposes of experimentation.

Diff Detail

Event Timeline

peterwaller-arm created this revision.May 3 2022, 2:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 3 2022, 2:48 AM
peterwaller-arm requested review of this revision.May 3 2022, 2:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 3 2022, 2:48 AM
  • Add tests:
    • Switch to utils/update_analyze_test_checks.py
    • Increasing
    • Decreasing
    • Underflow
    • FP
dmgreen added a subscriber: dmgreen.May 3 2022, 4:50 AM

I think it would be clearer if the option just override the existing value, as opposed to being an adjustment from it. Otherwise it might start to mean different things as VectorInsertExtractBaseCost changes.

peterwaller-arm retitled this revision from [AArch64] Add -aarch64-insert-extract-cost-adjustment to [AArch64] Add -aarch64-insert-extract-base-cost.
peterwaller-arm edited the summary of this revision. (Show Details)
  • Make the flag absolute, per review comment (-aarch64-insert-extract-cost-adjustment => -aarch64-insert-extract-base-cost)

Thanks for the comment, updated.

In the previous patch I missed that the choice of CPU can override the default
value, and by chance this continued to work. Add a test and fix this.

dmgreen accepted this revision.May 3 2022, 6:23 AM

Thanks. SGTM

llvm/lib/Target/AArch64/AArch64Subtarget.cpp
60–62

You can drop the {} brackets from single statement blocks.

This revision is now accepted and ready to land.May 3 2022, 6:23 AM
  • Drop unneeded braces.
  • Drop unneeded default argument.
peterwaller-arm marked an inline comment as done.May 3 2022, 6:58 AM
peterwaller-arm added inline comments.
llvm/lib/Target/AArch64/AArch64Subtarget.cpp
60–62

Oops, thanks.

This revision was automatically updated to reflect the committed changes.
peterwaller-arm marked an inline comment as done.