llvm-project/llvm/docs/TableGen
Nicolai Haehnle 0243aaf42c TableGen: Add !size operation
Summary:
Returns the size of a list. I have found this to be rather useful in some
development for the AMDGPU backend where we could simplify our .td files
by concatenating list<LLVMType> for complex intrinsics. Doing so requires
us to compute the position argument for LLVMMatchType.

Basically, the usage is in a pattern that looks somewhat like this:

    list<LLVMType> argtypes =
        !listconcat(base,
                    [llvm_any_ty, LLVMMatchType<!size(base)>]);

Change-Id: I360a0b000fd488d18bea412228230fd93722bd2c

Reviewers: arsenm, craig.topper, tra, MartinO

Subscribers: wdng, llvm-commits, tpr

Differential Revision: https://reviews.llvm.org/D43553

llvm-svn: 325883
2018-02-23 10:46:07 +00:00
..
BackEnds.rst [X86][AVX512] Adding new LLVM TableGen backend which generates the EVEX2VEX compressing tables. 2017-03-07 08:11:19 +00:00
Deficiencies.rst
LangIntro.rst TableGen: Add !size operation 2018-02-23 10:46:07 +00:00
LangRef.rst TableGen: Add !size operation 2018-02-23 10:46:07 +00:00
index.rst