This is an archive of the discontinued LLVM Phabricator instance.

[X86] Remove unnecessary extra encodings from the CPU name enum in clang
ClosedPublic

Authored by craig.topper on Sep 15 2017, 3:37 PM.

Details

Summary

For a lot of older CPUs we have a 1:1 mapping between CPU name and enum name. But many of them are effectively aliases of each other and as a result are always repeated together at every usage

This patch removes most of the duplication. It also uses StringSwitch::Cases to make the many to one mapping in the StringSwitch more obvious.

Diff Detail

Event Timeline

craig.topper created this revision.Sep 15 2017, 3:37 PM
RKSimon accepted this revision.Sep 16 2017, 2:34 AM

LGTM

This revision is now accepted and ready to land.Sep 16 2017, 2:34 AM
This revision was automatically updated to reflect the committed changes.