diff options
author | Rahul Joshi <rjoshi@nvidia.com> | 2024-10-01 09:08:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-01 09:08:47 -0700 |
commit | 0de0354aa8dcd6afab625c6833cb0f40309c2961 (patch) | |
tree | cd2c1f1910481606023f2fa94b95863b3157a972 /llvm/unittests/Support/ModRefTest.cpp | |
parent | 0eb26021d2a95cbe69b3b7c9f271f4a59b0f52a4 (diff) | |
download | llvm-0de0354aa8dcd6afab625c6833cb0f40309c2961.zip llvm-0de0354aa8dcd6afab625c6833cb0f40309c2961.tar.gz llvm-0de0354aa8dcd6afab625c6833cb0f40309c2961.tar.bz2 |
[LLVM][TableGen] Decrease code size of `Intrinsic::getAttributes` (#110573)
Decrease code size of `Intrinsic::getAttributes` function by uniquing
the function and argument attributes separately and using the
`IntrinsicsToAttributesMap` to store argument attribute ID in low 8 bits
and function attribute ID in upper 8 bits.
This reduces the number of cases to handle in the generated switch from
368 to 131, which is ~2.8x reduction in the number of switch cases.
Also eliminate the fixed size array `AS` and `NumAttrs` variable, and
instead call `AttributeList::get` directly from each case, with an
inline array of the <index, AttribueSet> pairs.
Diffstat (limited to 'llvm/unittests/Support/ModRefTest.cpp')
0 files changed, 0 insertions, 0 deletions