aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-10-11 13:56:06 +0200
committerNikita Popov <npopov@redhat.com>2022-10-12 10:56:01 +0200
commit2a26a445b342b0fa6090e8e99bf1fd0f18f6f7df (patch)
tree87afbefd3a07b43a6bd573f95a9a800bbb1695ae /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent0577a9f8d06b97bf8b4d9aa171096e0797e4f5d1 (diff)
downloadllvm-2a26a445b342b0fa6090e8e99bf1fd0f18f6f7df.zip
llvm-2a26a445b342b0fa6090e8e99bf1fd0f18f6f7df.tar.gz
llvm-2a26a445b342b0fa6090e8e99bf1fd0f18f6f7df.tar.bz2
[Attributes] Make intrinsic attribute generation more flexible (NFC)
Currently attributes for intrinsics are emitted using the ArrayRef<AttrKind> based constructor for AttributeLists. This works out fine for simple enum attributes, but doesn't really generalize to attributes that accept values. We're already doing something awkward for alignment attributes, and I'd like to have a cleaner solution to this with https://discourse.llvm.org/t/rfc-unify-memory-effect-attributes/65579 in mind. The new generation approach is to instead directly construct Attributes, giving us access to the full generality of that interface. To avoid significantly increasing the size of the generated code, we now also deduplicate the attribute sets. The code generated per unique AttributeList looks like this: case 204: { AS[0] = {1, getIntrinsicArgAttributeSet(C, 5)}; AS[1] = {AttributeList::FunctionIndex, getIntrinsicFnAttributeSet(C, 10)}; NumAttrs = 2; break; } and then the helper functions contain something like case 5: return AttributeSet::get(C, { Attribute::get(C, Attribute::NoCapture), }); and case 10: return AttributeSet::get(C, { Attribute::get(C, Attribute::NoUnwind), Attribute::get(C, Attribute::ArgMemOnly), }); A casualty of this change is the intrin-properties.td test, as I don't think that FileCheck allows matching this kind of output. Differential Revision: https://reviews.llvm.org/D135679
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions