[all-commits] [llvm/llvm-project] b8bf94: [TableGen] Fix excessive compile time issue in Fix...
Jay Foad via All-commits
all-commits at lists.llvm.org
Wed Mar 17 02:38:54 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b8bf94df2576b2ab1213a17e6e09fed38c684090
https://github.com/llvm/llvm-project/commit/b8bf94df2576b2ab1213a17e6e09fed38c684090
Author: Jay Foad <jay.foad at amd.com>
Date: 2021-03-17 (Wed, 17 Mar 2021)
Changed paths:
M llvm/test/TableGen/BitOffsetDecoder.td
M llvm/test/TableGen/FixedLenDecoderEmitter/InitValue.td
M llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
Log Message:
-----------
[TableGen] Fix excessive compile time issue in FixedLenDecoderEmitter
This patch reduces the time taken for clang to compile the generated
disassembler for an out-of-tree target with InsnType bigger than 64 bits
from 4m30s to 48s.
D67686 did a similar thing for CodeEmitterGen.
The idea is to tweak the API of the APInt-like InsnType class so that
we don't need so many temporary InsnTypes. This takes advantage of the
rule stated in D52100 that currently "no string of bits extracted
from the encoding may exceeed 64-bits", so we can use uint64_t for some
temporaries.
D52100 goes on to say that "fields are still permitted to exceed 64-bits
so long as they aren't one contiguous string of bits". This patch breaks
that by always using a "uint64_t tmp" in the generated decodeToMCInst,
but it should be easy to fix in FilterChooser::emitBinaryParser by
choosing to use a different type of tmp based on the known total field
width.
Differential Revision: https://reviews.llvm.org/D98046
More information about the All-commits
mailing list