commit | 52d7f68fdef1100a4fc32d2ae3356d7373a3366f | [log] [tgz] |
---|---|---|
author | Kristina Bessonova <kbessonova@accesssoftek.com> | Sat Dec 04 14:08:10 2021 +0200 |
committer | Copybara-Service <copybara-worker@google.com> | Sun Dec 05 04:01:55 2021 -0800 |
tree | de35976635b778571e2667a0eaa417c639caf1ab | |
parent | 538bb75c68969391343a1093d482fecc837225af [diff] |
Reland [DwarfDebug] Move emission of global vars, types and imports to endModule() This patch proposes to move emission of global variables, types, imported entities, etc from DwarfDebug::beginModule() to DwarfDebug::endModule(). Effectively, this changes nothing but the order of debug entities which will be as follows: * subprograms (including related context, local variables/labels, local imported entities; related types can be created as a part of the emission of local entities of an abstract subprogram); * global variables (including related context and types); * retained types and enums; * non-local-scoped imported entities; * basic types; * other types left (as a part of local variables attributes emission). Note that the order of emitted compile units may also be changed as now we emit units that contain subprograms first and then all other non-empty units. The motivation behind this change is the following: (1) DwarfDebug::beginModule() is run at the very beginning of backend's pipeline, from this time IR can be significantly changed by target-specific passes. If it happens for debug metadata of global entities, those changes will not be reflected in the emitted DWARF. (2) imported subprogram names should refer to an abstract subprogram if it exists, but it isn't known in DwarfDebug::beginModule() (it's possible to make some guesses based on location info, but it's not quite reliable); (3) aforementioned entities if they are scoped within a bracketed block (subject of D113741) couldn't be emitted in DwarfDebug::beginModule() (they need parent emitted first). Another problem is if to try to gather some information about local entities and defer their emission (till subprogram's processing or DwarfDebug::endModule()) all the gathered details might be irrelevant / invalid by the time the entities are being emitted (because of (1)). Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D114705 GitOrigin-RevId: 0ac75e82fff93a80ca401d3db3541e8d1d9098f9
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.
It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f
.