[all-commits] [llvm/llvm-project] 8ae183: Store OptTable::Info::Name as a StringRef

serge-sans-paille via All-commits all-commits at lists.llvm.org
Tue Dec 6 05:13:49 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ae18303f97d5dcfaecc90b4d87effb2011ed82e
      https://github.com/llvm/llvm-project/commit/8ae18303f97d5dcfaecc90b4d87effb2011ed82e
  Author: serge-sans-paille <sguelton at mozilla.com>
  Date:   2022-12-06 (Tue, 06 Dec 2022)

  Changed paths:
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M llvm/include/llvm/Option/OptTable.h
    M llvm/lib/Option/OptTable.cpp
    M llvm/unittests/Option/OptionMarshallingTest.cpp
    M llvm/utils/TableGen/OptParserEmitter.cpp

  Log Message:
  -----------
  Store OptTable::Info::Name as a StringRef

This avoids implicit conversion to StringRef at several points, which in
turns avoid redundant calls to strlen.

As a side effect, this greatly simplifies the implementation of
StrCmpOptionNameIgnoreCase.

It also eventually gives a consistent, humble speedup in compilation
time.

https://llvm-compile-time-tracker.com/compare.php?from=5f5b942823474e98e43a27d515a87ce140396c53&to=60e13b778119fc32d50dc38ff1a564a87146e9c6&stat=instructions:u

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




More information about the All-commits mailing list