[all-commits] [llvm/llvm-project] d9ab3e: [clang] Use a StringRef instead of a raw char poin...
serge-sans-paille via All-commits
all-commits at lists.llvm.org
Tue Dec 27 00:55:44 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d9ab3e82f30d646deff054230b0c742704a1cf26
https://github.com/llvm/llvm-project/commit/d9ab3e82f30d646deff054230b0c742704a1cf26
Author: serge-sans-paille <sguelton at mozilla.com>
Date: 2022-12-27 (Tue, 27 Dec 2022)
Changed paths:
M clang-tools-extra/clangd/CompileCommands.cpp
M clang/include/clang/Basic/Builtins.h
M clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h
M clang/lib/AST/ExprConstant.cpp
M clang/lib/Basic/Builtins.cpp
M clang/lib/Basic/Targets/AArch64.cpp
M clang/lib/Basic/Targets/AArch64.h
M clang/lib/Basic/Targets/AMDGPU.cpp
M clang/lib/Basic/Targets/AMDGPU.h
M clang/lib/Basic/Targets/ARM.cpp
M clang/lib/Basic/Targets/ARM.h
M clang/lib/Basic/Targets/BPF.cpp
M clang/lib/Basic/Targets/BPF.h
M clang/lib/Basic/Targets/Hexagon.cpp
M clang/lib/Basic/Targets/Hexagon.h
M clang/lib/Basic/Targets/LoongArch.cpp
M clang/lib/Basic/Targets/LoongArch.h
M clang/lib/Basic/Targets/Mips.cpp
M clang/lib/Basic/Targets/Mips.h
M clang/lib/Basic/Targets/NVPTX.cpp
M clang/lib/Basic/Targets/NVPTX.h
M clang/lib/Basic/Targets/PPC.cpp
M clang/lib/Basic/Targets/PPC.h
M clang/lib/Basic/Targets/RISCV.cpp
M clang/lib/Basic/Targets/RISCV.h
M clang/lib/Basic/Targets/SystemZ.cpp
M clang/lib/Basic/Targets/SystemZ.h
M clang/lib/Basic/Targets/VE.cpp
M clang/lib/Basic/Targets/VE.h
M clang/lib/Basic/Targets/WebAssembly.cpp
M clang/lib/Basic/Targets/WebAssembly.h
M clang/lib/Basic/Targets/X86.cpp
M clang/lib/Basic/Targets/XCore.cpp
M clang/lib/Basic/Targets/XCore.h
M clang/lib/CodeGen/CGBuiltin.cpp
M clang/lib/Driver/DriverOptions.cpp
M clang/lib/Sema/SemaChecking.cpp
M clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
M clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/ContainerModeling.cpp
M clang/lib/StaticAnalyzer/Checkers/DebugContainerModeling.cpp
M clang/lib/StaticAnalyzer/Checkers/DebugIteratorModeling.cpp
M clang/lib/StaticAnalyzer/Checkers/ErrnoModeling.cpp
M clang/lib/StaticAnalyzer/Checkers/ErrnoTesterChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp
M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/ValistChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp
M clang/lib/StaticAnalyzer/Checkers/cert/PutenvWithAutoChecker.cpp
M clang/lib/StaticAnalyzer/Core/CallDescription.cpp
M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
M clang/unittests/StaticAnalyzer/BugReportInterestingnessTest.cpp
M clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp
M clang/unittests/StaticAnalyzer/ConflictingEvalCallsTest.cpp
M clang/unittests/StaticAnalyzer/FalsePositiveRefutationBRVisitorTest.cpp
M clang/unittests/StaticAnalyzer/NoStateChangeFuncVisitorTest.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/include/llvm/ADT/ArrayRef.h
M llvm/include/llvm/Option/OptTable.h
M llvm/include/llvm/Option/Option.h
M llvm/lib/ExecutionEngine/JITLink/COFFDirectiveParser.cpp
M llvm/lib/Option/OptTable.cpp
M llvm/lib/Option/Option.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-objdump/llvm-objdump.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
M llvm/utils/TableGen/OptParserEmitter.cpp
Log Message:
-----------
[clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile time.
It has a slight impact on preprocessing / compile time, see
https://llvm-compile-time-tracker.com/compare.php?from=3f36d2d579d8b0e8824d9dd99bfa79f456858f88&to=e49640c507ddc6615b5e503144301c8e41f8f434&stat=instructions:u
This a recommit of e953ae5bbc313fd0cc980ce021d487e5b5199ea4 and the subsequent fixes caa713559bd38f337d7d35de35686775e8fb5175 and 06b90e2e9c991e211fecc97948e533320a825470.
The above patchset caused some version of GCC to take eons to compile clang/lib/Basic/Targets/AArch64.cpp, as spotted in aa171833ab0017d9732e82b8682c9848ab25ff9e.
The fix is to make BuiltinInfo tables a compilation unit static variable, instead of a private static variable.
Differential Revision: https://reviews.llvm.org/D139881
More information about the All-commits
mailing list