]> granicus.if.org Git - clang/commit
[X86] Remove unnecessary extra encodings from the CPU name enum in clang
authorCraig Topper <craig.topper@intel.com>
Sat, 16 Sep 2017 16:44:39 +0000 (16:44 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 16 Sep 2017 16:44:39 +0000 (16:44 +0000)
commite7476fadc94b87293e7192c419125cf446d454ce
tree1d4b3d8dbf1fd42b58c36a95aadf4aac62ee5a2c
parentad56fa864310d75036da71597ca7381aada68c09
[X86] Remove unnecessary extra encodings from the CPU name enum in clang

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.

Reviewers: RKSimon, spatel, zvi, igorb

Reviewed By: RKSimon

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D37938

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313462 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/Targets/X86.cpp
lib/Basic/Targets/X86.h