aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Analysis/ValueTrackingTest.cpp
diff options
context:
space:
mode:
authorFreddy Ye <freddy.ye@intel.com>2023-07-05 17:31:11 +0800
committerFreddy Ye <freddy.ye@intel.com>2023-07-05 17:32:00 +0800
commit7717c0071d7ce9f4ca7b1417f677bb0380171621 (patch)
tree519ff608faca7bcd25cbe3105ea6f1c1676940fa /llvm/unittests/Analysis/ValueTrackingTest.cpp
parent80c5698ec30d57f2fa950eb1ced14406e8ec5df0 (diff)
downloadllvm-7717c0071d7ce9f4ca7b1417f677bb0380171621.zip
llvm-7717c0071d7ce9f4ca7b1417f677bb0380171621.tar.gz
llvm-7717c0071d7ce9f4ca7b1417f677bb0380171621.tar.bz2
[X86] Remove CPU_SPECIFIC* MACROs and add getCPUDispatchMangling
This refactor patch means to remove CPU_SPECIFIC* MACROs in X86TargetParser.def and move those information into ProcInfo of X86TargetParser.cpp. Since these two files both maintain a table with redundant info such as cpuname and its features supported. CPU_SPECIFIC* MACROs define some different information. This patch dealt with them in these ways when moving: 1.mangling This is now moved to Mangling in ProcInfo and directly initialized at array of Processors. CPUs don't support cpu_dispatch/specific are assigned '\0' as mangling. 2.CPU alias The alias cpu will also be initialized in array of Processors, its attributes will be same as its alias target cpu. Same feature list, same mangling. 3.TUNE_NAME Before my change, some cpu names support cpu_dispatch/specific are not supported in X86.td, which means optimizer/backend doesn't recognize them. So they use a different TUNE_NAME to generate in IR. In this patch, I added these missing cpu support at X86.td by utilizing existing Features and XXXTunings, so that each cpu name can directly use its own name as TUNE_NAME to be supported by optimizer/backend. 4.Feature list The feature list of one CPU maintained in X86TargetParser.def is not same as the one in X86TargetParser.cpp. It only maintains part of features of one CPU (features defined by X86_FEATURE_COMPAT). While X86TargetParser.cpp maintains a complete one. This patch abandons the feature list maintained by CPU_SPECIFIC* MACROs because assigning a CPU with a complete one doesn't affect the functionality of cpu_dispatch/specific. Except these four info, since some of CPUs supported by cpu_dispatch/specific doesn's support clang options like -march, -mtune before, this patch also kept this behavior still by adding another member OnlyForCPUDispatchSpecific in ProcInfo. Reviewed By: pengfei, RKSimon Differential Revision: https://reviews.llvm.org/D151696
Diffstat (limited to 'llvm/unittests/Analysis/ValueTrackingTest.cpp')
0 files changed, 0 insertions, 0 deletions