This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Add clang option -m[no-]pcrel
ClosedPublic

Authored by lei on May 28 2020, 1:36 PM.

Details

Summary

Add user-facing front end option to turn off pc-relative memops.
This will be compatible with gcc.

Diff Detail

Event Timeline

lei created this revision.May 28 2020, 1:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 28 2020, 1:36 PM
jsji added a reviewer: Restricted Project.May 28 2020, 2:08 PM
jsji added a project: Restricted Project.
saghir accepted this revision.May 28 2020, 2:20 PM
saghir added a subscriber: saghir.

Other than the nit, this looks good to me.

clang/test/Driver/ppc-pcrel.cpp
2

nit: would the first two checks be better off in clang/test/Driver/ppc-features.cpp?

This revision is now accepted and ready to land.May 28 2020, 2:20 PM
NeHuang accepted this revision as: NeHuang.May 28 2020, 3:01 PM

LGTM

lei marked an inline comment as done.May 29 2020, 5:46 AM
lei added inline comments.
clang/test/Driver/ppc-pcrel.cpp
2

I think it's better to keep all tests for pcrel within this specific pcrel test file.

saghir added inline comments.May 29 2020, 12:45 PM
clang/test/Driver/ppc-pcrel.cpp
2

I don't feel too strongly about where to keep it... there are checks for other target features in ppc-features.cpp so felt pcrel feature check could be put there along with other feature checks.
But feel free to keep them here if you feel that's more appropriate.

stefanp accepted this revision as: stefanp.Jun 1 2020, 8:54 AM

LGTM.

This revision was automatically updated to reflect the committed changes.
MaskRay added a subscriber: MaskRay.Jun 1 2020, 4:48 PM

arc adds many unneeded tags from Phabricator. You can drop Reviewers: Subscribers: Tags: and the text Summary: with the following script:

arcfilter () {
  arc amend
  git log -1 --pretty=%B | awk '/Reviewers:|Subscribers:/{p=1} /Reviewed By:|Differential Revision:/{p=0} !p && !/^Summary:$/ {sub(/^Summary: /,"");print}' | git commit --amend --date=now -F -
}

Reviewed By: is considered important by some people (https://lists.llvm.org/pipermail/llvm-dev/2020-January/137889.html). You should keep the tag. (I started to use --date=now because some people find author date != committer date annoying. The committer date is usually what people care.))