aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/ConfigParseTest.cpp
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2024-02-15 04:02:30 +0000
committerGitHub <noreply@github.com>2024-02-15 04:02:30 +0000
commitde6fad51462bd0784beafef6fd171ad7725205b5 (patch)
tree258f43473c82ebf58be9ea060ed2e64b96b45a30 /clang/unittests/Format/ConfigParseTest.cpp
parentdcbb574cfc3445251ff1c751f27b52ed6503bead (diff)
downloadllvm-de6fad51462bd0784beafef6fd171ad7725205b5.zip
llvm-de6fad51462bd0784beafef6fd171ad7725205b5.tar.gz
llvm-de6fad51462bd0784beafef6fd171ad7725205b5.tar.bz2
[TableGen][NFCI] Simplify TypeSetByHwMode::intersect and make extensible (#81688)
The current implementation considers both iPTR+iN and everything else all in one go, which leads to more special casing when iPTR is present in only one set than is described in the comment block. Moreover this makes it very difficult to add any new iPTR-like wildcards due to the exponential combinatorial explosion that occurs. Logically, iPTR+iN handling is entirely independent from everything else, so rewrite the code to do them separately. This removes special cases, making the core of the implementation more succinct, whilst more clearly implementing exactly what is described in the comment block, and allows for any number of (non-overlapping) wildcards to be added to the list, as needed by CHERI LLVM downstream (due to having a new capability type which, much like a normal integer pointer in LLVM, varies in size between targets and modes). In testing, this change results in identical TableGen output for all in-tree backends (including those in LLVM_ALL_EXPERIMENTAL_TARGETS), and it is intended that this implementation is entirely equivalent to the old one.
Diffstat (limited to 'clang/unittests/Format/ConfigParseTest.cpp')
0 files changed, 0 insertions, 0 deletions