[all-commits] [llvm/llvm-project] 991d80: [Option] Store the StringTable by value. NFC (#224...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat Sep 19 00:28:45 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 991d80d79b9d56b75c4d2bd07bf124e710dcbfaa
      https://github.com/llvm/llvm-project/commit/991d80d79b9d56b75c4d2bd07bf124e710dcbfaa
  Author: Fangrui Song <i at maskray.me>
  Date:   2026-09-19 (Sat, 19 Sep 2026)

  Changed paths:
    M llvm/include/llvm/Option/OptTable.h
    M llvm/lib/Option/OptTable.cpp
    M llvm/utils/TableGen/OptionParserEmitter.cpp

  Log Message:
  -----------
  [Option] Store the StringTable by value. NFC (#224818)

Suggested by
https://github.com/llvm/llvm-project/pull/224805#discussion_r4052408942

A StringTable is just a StringRef. Hold it by value and build it from
the storage array in optionTables(), so the generated OptionStrTable
object (16 bytes of .data.rel.ro and a relocation per table) is
unreferenced and discarded, and string lookups skip a load.

Aided by Opus 5



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list