[all-commits] [llvm/llvm-project] 880afa: [TableGen] Use vectors instead of sets for testing...

Jay Foad via All-commits all-commits at lists.llvm.org
Tue Feb 13 05:44:43 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 880afa1c5d1b099eed5034340a67e56b9dda4c09
      https://github.com/llvm/llvm-project/commit/880afa1c5d1b099eed5034340a67e56b9dda4c09
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M llvm/utils/TableGen/AsmMatcherEmitter.cpp
    M llvm/utils/TableGen/CodeGenRegisters.cpp

  Log Message:
  -----------
  [TableGen] Use vectors instead of sets for testing intersection. NFC. (#81602)

In a few places we test whether sets (i.e. sorted ranges) intersect by
computing the set_intersection and then testing whether it is empty. For
this purpose it should be more efficient to use a std:vector instead of
a std::set to hold the result of the set_intersection, since insertion
is simpler.




More information about the All-commits mailing list