[all-commits] [llvm/llvm-project] 242192: [TableGen][DecoderEmitter] Infer encoding's HasCom...

Sergei Barannikov via All-commits all-commits at lists.llvm.org
Thu Aug 21 14:35:53 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2421929ca62af916fa68aeb9463f5a2a9f8fd99d
      https://github.com/llvm/llvm-project/commit/2421929ca62af916fa68aeb9463f5a2a9f8fd99d
  Author: Sergei Barannikov <barannikov88 at gmail.com>
  Date:   2025-08-21 (Thu, 21 Aug 2025)

  Changed paths:
    M llvm/utils/TableGen/DecoderEmitter.cpp

  Log Message:
  -----------
  [TableGen][DecoderEmitter] Infer encoding's HasCompleteDecoder earlier (NFCI) (#154644)

If an encoding has a custom decoder, the decoder is assumed to be
"complete" (always succeed) if hasCompleteDecoder field is true. We
determine this when constructing InstructionEncoding.

If the decoder for an encoding is *generated*, it always succeeds if
none of the operand decoders can fail. The latter is determined based on
the value of operands' DecoderMethod/hasCompleteDecoder. This happens
late, at table construction time, making the code harder to follow.

This change moves this logic to the InstructionEncoding constructor.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list