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

serge-sans-paille via All-commits all-commits at lists.llvm.org
Wed Dec 7 07:33:04 PST 2022


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

  Changed paths:
    M clang/lib/Driver/ToolChains/Gnu.cpp
    M lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.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 is a recommit of 8ae18303f97d5dcfaecc90b4d87effb2011ed82e,
with a few cleanups.

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 (timing updated since original commit).

https://llvm-compile-time-tracker.com/compare.php?from=76fcfea283472a80356d87c89270b0e2d106b54c&to=b70eb1f347f22fe4d2977360c4ed701eabc43994&stat=instructions:u

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




More information about the All-commits mailing list