Author: ctopper Date: Thu Mar 21 10:33:20 2019 New Revision: 356686 URL: http://llvm.org/viewvc/llvm-project?rev=356686&view=rev Log: [X86] Use the CPUKind enum from PROC_ALIAS to directly get the CPUKind in fillValidCPUList.
We were using getCPUKind which translates the string to the enum also using PROC_ALIAS. This just cuts out the string compares. Modified: cfe/trunk/lib/Basic/Targets/X86.cpp Modified: cfe/trunk/lib/Basic/Targets/X86.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/X86.cpp?rev=356686&r1=356685&r2=356686&view=diff ============================================================================== --- cfe/trunk/lib/Basic/Targets/X86.cpp (original) +++ cfe/trunk/lib/Basic/Targets/X86.cpp Thu Mar 21 10:33:20 2019 @@ -1819,10 +1819,9 @@ void X86TargetInfo::fillValidCPUList(Sma #define PROC(ENUM, STRING, IS64BIT) \ if (IS64BIT || getTriple().getArch() == llvm::Triple::x86) \ Values.emplace_back(STRING); - // Go through CPUKind checking to ensure that the alias is de-aliased and - // 64 bit-ness is checked. + // For aliases we need to lookup the CPUKind to check get the 64-bit ness. #define PROC_ALIAS(ENUM, ALIAS) \ - if (checkCPUKind(getCPUKind(ALIAS))) \ + if (checkCPUKind(CK_##ENUM)) \ Values.emplace_back(ALIAS); #include "clang/Basic/X86Target.def" } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits