Files
clang-p2996/llvm/utils/TableGen/DecoderEmitter.cpp
Jason Eckhardt 1442b0e653 [TableGen] Remove redundant buffer copies for ULEB128 decode calls. (#80199)
This patch removes a couple of redundant buffer copies in emitTable for
setting up calls to decodeULEB128. Instead, provide the Table.data
buffer directly to the calls-- where decodeULEB128 does its own buffer
overflow checking.

Factor out 7 explicit loops to emit ULEB128 bytes into emitULEB128. Also
factor out 4 copies of 24-bit numtoskip emission into emitNumToSkip.

The functionality is already covered by existing unit tests and by
virtue of most of the in-tree back-ends exercising the decoder emitter.
2024-02-06 13:23:13 +08:00

93 KiB