[all-commits] [llvm/llvm-project] 6afdf4: [TableGen] Stabilize sort in GET_SUBTARGETINFO_MAC...

Kevin P. Neal via All-commits all-commits at lists.llvm.org
Wed Jun 28 05:29:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6afdf4052551bb3eea013c8ffeeb30112ccd69a3
      https://github.com/llvm/llvm-project/commit/6afdf4052551bb3eea013c8ffeeb30112ccd69a3
  Author: Kevin P. Neal <kevin.neal at sas.com>
  Date:   2023-06-28 (Wed, 28 Jun 2023)

  Changed paths:
    M llvm/include/llvm/TableGen/Record.h
    M llvm/utils/TableGen/SubtargetEmitter.cpp

  Log Message:
  -----------
  [TableGen] Stabilize sort in GET_SUBTARGETINFO_MACRO block

The sort of the elements in the GET_SUBTARGETINFO_MACRO block is done on
the "Name" field of each record. This field is not guaranteed to be unique,
is not guaranteed to even have a value at all, and is not used in the
output anyway. Change to sort on the "FieldName" field which should be
unique.

Problem spotted when lib/Target/PowerPC/PPCGenSubtargetInfo.inc changed
unexpectedly.

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




More information about the All-commits mailing list