diff options
author | Fangrui Song <i@maskray.me> | 2024-06-11 09:18:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 09:18:31 -0700 |
commit | de19f7b6d46f1c38e10e604154f0fdaaffde9ebd (patch) | |
tree | c12a54c936c1a823b3589b30e1974b4bb07ef759 /lldb/source/Commands/CommandObjectThread.cpp | |
parent | 4cf607fa15fd9ccd79115095a1eb02e0cd83e1a9 (diff) | |
download | llvm-de19f7b6d46f1c38e10e604154f0fdaaffde9ebd.zip llvm-de19f7b6d46f1c38e10e604154f0fdaaffde9ebd.tar.gz llvm-de19f7b6d46f1c38e10e604154f0fdaaffde9ebd.tar.bz2 |
[MC] Replace fragment ilist with singly-linked lists
Fragments are allocated with `operator new` and stored in an ilist with
Prev/Next/Parent pointers. A more efficient representation would be an
array of fragments without the overhead of Prev/Next pointers.
As the first step, replace ilist with singly-linked lists.
* `getPrevNode` uses have been eliminated by previous changes.
* The last use of the `Prev` pointer remains: for each subsection, there is an insertion point and
the current insertion point is stored at `CurInsertionPoint`.
* `HexagonAsmBackend::finishLayout` needs a backward iterator. Save all
fragments within `Frags`. Hexagon programs are usually small, and the
performance does not matter that much.
To eliminate `Prev`, change the subsection representation to
singly-linked lists for subsections and a pointer to the active
singly-linked list. The fragments from all subsections will be chained
together at layout time.
Since fragment lists are disconnected before layout time, we can remove
`MCFragment::SubsectionNumber` (https://reviews.llvm.org/D69411). The
current implementation of `AttemptToFoldSymbolOffsetDifference` requires
future improvement for robustness.
Pull Request: https://github.com/llvm/llvm-project/pull/95077
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
0 files changed, 0 insertions, 0 deletions