[all-commits] [llvm/llvm-project] b5a0f0: [ELF] Add ELFFileBase::{elfShdrs, numELFShdrs} to a...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Dec 24 17:10:53 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b5a0f0f397c778cc7db71754c1b9c939f669568e
https://github.com/llvm/llvm-project/commit/b5a0f0f397c778cc7db71754c1b9c939f669568e
Author: Fangrui Song <i at maskray.me>
Date: 2021-12-24 (Fri, 24 Dec 2021)
Changed paths:
M lld/ELF/DWARF.cpp
M lld/ELF/Driver.cpp
M lld/ELF/InputFiles.cpp
M lld/ELF/InputFiles.h
M lld/ELF/InputSection.cpp
M lld/ELF/Relocations.cpp
Log Message:
-----------
[ELF] Add ELFFileBase::{elfShdrs,numELFShdrs} to avoid duplicate llvm::object::ELFFile::sections()
This mainly avoid `relsOrRelas` cost in `InputSectionBase::relocate`.
`llvm::object::ELFFile::sections()` has redundant and expensive checks.
More information about the All-commits
mailing list