forked from OSchip/llvm-project
dc152659b4
Due to various implementation constraints, despite the programmer choosing a 'processor' cpu_dispatch/cpu_specific needs to use the 'feature' list of a processor to identify it. This results in the identified processor in source-code not being propogated to the optimizer, and thus, not able to be tuned for. This patch changes to use the actual cpu as written for tune-cpu so that opt can make decisions based on the cpu-as-spelled, which should better match the behavior expected by the programmer. Note that the 'valid' list of processors for x86 is in llvm/include/llvm/Support/X86TargetParser.def. At the moment, this list contains only Intel processors, but other vendors may wish to add their own entries as 'alias'es (or with different feature lists!). If this is not done, there is two potential performance issues with the patch, but I believe them to be worth it in light of the improvements to behavior and performance. 1- In the event that the user spelled "ProcessorB", but we only have the features available to test for "ProcessorA" (where A is B minus features), AND there is an optimization opportunity for "B" that negatively affects "A", the optimizer will likely choose to do so. 2- In the event that the user spelled VendorI's processor, and the feature list allows it to run on VendorA's processor of similar features, AND there is an optimization opportunity for VendorIs that negatively affects "A"s, the optimizer will likely choose to do so. This can be fixed by adding an alias to X86TargetParser.def. Differential Revision: https://reviews.llvm.org/D121410 |
||
---|---|---|
.. | ||
Targets | ||
Attributes.cpp | ||
Builtins.cpp | ||
CLWarnings.cpp | ||
CMakeLists.txt | ||
CharInfo.cpp | ||
CodeGenOptions.cpp | ||
Cuda.cpp | ||
DarwinSDKInfo.cpp | ||
Diagnostic.cpp | ||
DiagnosticIDs.cpp | ||
DiagnosticOptions.cpp | ||
ExpressionTraits.cpp | ||
FileEntry.cpp | ||
FileManager.cpp | ||
FileSystemStatCache.cpp | ||
IdentifierTable.cpp | ||
LangOptions.cpp | ||
LangStandards.cpp | ||
Module.cpp | ||
NoSanitizeList.cpp | ||
ObjCRuntime.cpp | ||
OpenCLOptions.cpp | ||
OpenMPKinds.cpp | ||
OperatorPrecedence.cpp | ||
ProfileList.cpp | ||
SanitizerSpecialCaseList.cpp | ||
Sanitizers.cpp | ||
SourceLocation.cpp | ||
SourceManager.cpp | ||
Stack.cpp | ||
TargetID.cpp | ||
TargetInfo.cpp | ||
Targets.cpp | ||
Targets.h | ||
TokenKinds.cpp | ||
TypeTraits.cpp | ||
Version.cpp | ||
Warnings.cpp | ||
XRayInstr.cpp | ||
XRayLists.cpp |