This is an archive of the discontinued LLVM Phabricator instance.

Simplify getARMCPUForMArch() and make it more consistent
ClosedPublic

Authored by cpirker on Apr 17 2014, 7:11 AM.

Details

Reviewers
jroelofs
Summary

Hi All,

Handle Thumb and big-endian consistently for all "arm*" and "thumb*" Architectures.
Please review.

Thanks,
Christian

Diff Detail

Event Timeline

jroelofs added inline comments.Apr 18 2014, 9:18 AM
lib/Driver/Tools.cpp
4893

On second thought, this would allow things like "armblahblahblahv4" to be matched as "strongarm".

Maybe it is better to substr MArch to take off the arm/thumb part, then check for eb, chomp that off as well, and finally check that whats left is one of those suffixes.

scott-0 added inline comments.Apr 22 2014, 1:42 AM
lib/Driver/Tools.cpp
4893

Yes, perhaps it would be good to be stricter in the matching. But 'strongarm' is arguably a better choice for 'armblahblahblahv4' than the default 'arm7tdmi' (which is 'v4t').

Perhaps a warning is appropriate when the default is taken for a non-empty MArch?

cpirker updated this revision to Diff 8799.Apr 24 2014, 4:32 AM
cpirker edited edge metadata.

Hi All,

The check is now more stricter for the architecture.
Please review.

Thanks,
Christian

Hi Jon,

can you please review my second revision.

Thanks,
Christian

jroelofs accepted this revision.May 4 2014, 7:14 PM
jroelofs edited edge metadata.

Sorry, forgot about this. LGTM.

This revision is now accepted and ready to land.May 4 2014, 7:14 PM
cpirker closed this revision.May 5 2014, 2:02 AM

I committed this patch as r207956.