[all-commits] [llvm/llvm-project] 6ad1b4: Optimize OptTable::findNearest implementation and ...

serge-sans-paille via All-commits all-commits at lists.llvm.org
Thu Jan 19 05:17:00 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6ad1b4095172373590134afff19a7fbad9d7889d
      https://github.com/llvm/llvm-project/commit/6ad1b4095172373590134afff19a7fbad9d7889d
  Author: serge-sans-paille <sguelton at mozilla.com>
  Date:   2023-01-19 (Thu, 19 Jan 2023)

  Changed paths:
    M clang/lib/Driver/Driver.cpp
    M llvm/include/llvm/Option/OptTable.h
    M llvm/lib/Option/OptTable.cpp

  Log Message:
  -----------
  Optimize OptTable::findNearest implementation and usage

When used to find an exact match, some extra context can be used to
totally cut some computations.

This saves 1% of the instruction count when pre processing sqlite3.c
through

valgrind --tool=callgrind ./bin/clang -E sqlite3.c -o/dev/null

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




More information about the All-commits mailing list