This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Add -m[no-]power10-vector clang and llvm option
ClosedPublic

Authored by saghir on May 28 2020, 2:03 PM.

Details

Summary

This patch adds command line option for enabling power10-vector support.

Diff Detail

Event Timeline

saghir created this revision.May 28 2020, 2:03 PM
jsji added a reviewer: Restricted Project.May 28 2020, 2:08 PM
jsji added a project: Restricted Project.
amyk accepted this revision.May 29 2020, 9:39 AM

This LGTM.

This revision is now accepted and ready to land.May 29 2020, 9:39 AM
lei added inline comments.May 29 2020, 10:35 AM
clang/lib/Basic/Targets/PPC.cpp
421

I think it would be good to change this into a switch-stmt as there are enough conditional changed based on Name and probably more to come.

llvm/lib/Target/PowerPC/PPC.td
219

what's the relationship between this and p10 vector support?

saghir updated this revision to Diff 267859.Jun 2 2020, 6:22 AM

Removed P10Altivec.

saghir marked 2 inline comments as done.Jun 2 2020, 6:25 AM
saghir added inline comments.
clang/lib/Basic/Targets/PPC.cpp
421

Adding string switch here would complicate it more, so sticking with the current approach.

llvm/lib/Target/PowerPC/PPC.td
219

Removed P10Altivec since this is not really needed for P10.

lei accepted this revision.Jun 2 2020, 6:46 AM

LGTM.
Minor nit can be addressed during commit.

clang/lib/Basic/Targets/PPC.cpp
420

nit: this should be an else if, same as what you did on line 401.

saghir updated this revision to Diff 268031.Jun 2 2020, 6:13 PM
saghir marked an inline comment as done.
saghir removed a reviewer: power-llvm-team.

Addressed nit

saghir marked an inline comment as done.Jun 2 2020, 6:14 PM
saghir updated this revision to Diff 268893.Jun 5 2020, 11:43 AM

Updated the diff based on latest changes in master.

This revision was automatically updated to reflect the committed changes.