[all-commits] [llvm/llvm-project] d54802: [MC][ELF] Eliminate some hash maps from ELFObjectW...
Alexis Engelke via All-commits
all-commits at lists.llvm.org
Wed Jul 3 11:15:50 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d54802092de3d92c4ecd331801970b0d84fecc25
https://github.com/llvm/llvm-project/commit/d54802092de3d92c4ecd331801970b0d84fecc25
Author: Alexis Engelke <engelke at in.tum.de>
Date: 2024-07-03 (Wed, 03 Jul 2024)
Changed paths:
M llvm/include/llvm/MC/MCSectionELF.h
M llvm/lib/MC/ELFObjectWriter.cpp
Log Message:
-----------
[MC][ELF] Eliminate some hash maps from ELFObjectWriter (#97421)
Remove some maps. Mostly cleanup, only a slight performance win.
- Replace SectionIndexMap with layout order: The section layout order is
only used in MachO, so we can repurpose the field as section table
index.
- Store section offsets in MCSectionELF: No need for a map, and
especially not a std::map. Direct access to the underlying (and easily
modifyable) data structure is always faster.
- Improve storage of groups: There's no point in having a DenseMap, the
number of sections and groups are reasonably small to use vectors.
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