[PATCH] D83273: [X86] Remove the feature dependency handling in X86TargetInfo::setFeatureEnabledImpl to a table based lookup in X86TargetParser.cpp
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 6 18:45:19 PDT 2020
craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, echristo, erichkeane, LuoYuanke, LiuChen3, FreddyYe, xiangzhangllvm.
Herald added subscribers: jfb, hiraditya.
Herald added a project: LLVM.
Previously we had to specify the forward and backwards feature dependencies separately which was error prone. And as dependencies have gotten more complex it was hard to be sure the transitive dependencies were handled correctly. The way it was written was also not super readable.
This patch replaces everything with a table that lists what features a feature is dependent on directly. Then we just have to recursively walk through the table to find the transitive dependencies. This is largely based on how we handle subtarget features in the MC layer from the tablegen descriptions.
https://reviews.llvm.org/D83273
Files:
clang/lib/Basic/Targets/X86.cpp
clang/lib/Basic/Targets/X86.h
llvm/include/llvm/Support/X86TargetParser.def
llvm/include/llvm/Support/X86TargetParser.h
llvm/lib/Support/X86TargetParser.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83273.275882.patch
Type: text/x-patch
Size: 23210 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200707/a96138db/attachment-0001.bin>
More information about the cfe-commits
mailing list