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

serge-sans-paille via All-commits all-commits at lists.llvm.org
Thu Dec 8 01:29:20 PST 2022


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

  Changed paths:
    M clang/lib/Driver/DriverOptions.cpp
    M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
    M lld/COFF/DriverUtils.cpp
    M lld/ELF/DriverUtils.cpp
    M lld/MachO/DriverUtils.cpp
    M lld/MinGW/Driver.cpp
    M lld/wasm/Driver.cpp
    M lldb/tools/driver/Driver.cpp
    M lldb/tools/lldb-server/lldb-gdbserver.cpp
    M lldb/tools/lldb-vscode/lldb-vscode.cpp
    M llvm/lib/ExecutionEngine/JITLink/COFFDirectiveParser.cpp
    M llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
    M llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
    M llvm/tools/dsymutil/dsymutil.cpp
    M llvm/tools/llvm-cvtres/llvm-cvtres.cpp
    M llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
    M llvm/tools/llvm-dwarfutil/llvm-dwarfutil.cpp
    M llvm/tools/llvm-ifs/llvm-ifs.cpp
    M llvm/tools/llvm-lipo/llvm-lipo.cpp
    M llvm/tools/llvm-ml/llvm-ml.cpp
    M llvm/tools/llvm-mt/llvm-mt.cpp
    M llvm/tools/llvm-nm/llvm-nm.cpp
    M llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
    M llvm/tools/llvm-rc/llvm-rc.cpp
    M llvm/tools/llvm-readobj/llvm-readobj.cpp
    M llvm/tools/llvm-size/llvm-size.cpp
    M llvm/tools/llvm-strings/llvm-strings.cpp
    M llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
    M llvm/tools/llvm-tli-checker/llvm-tli-checker.cpp
    M llvm/unittests/Option/OptionParsingTest.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=de4b6a1bc64db33643f001ad45fae7b92b4a4688&to=c23a93d1292052b4be2fbe8c586fa31143d0c7ed&stat=instructions:u

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




More information about the All-commits mailing list