diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-06-27 00:38:26 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-06-27 00:38:26 +0000 |
| commit | 1f8a99a9ae8c22ac1c90ee623d132ca0ee4bc0f5 (patch) | |
| tree | e7acd4a5fa945bc284cf88492a121fbd65e88c83 /llvm/lib/IR/DebugInfoMetadata.cpp | |
| parent | ba4c8b50043a33eefac3d150d82e4fd5dfeba7dd (diff) | |
| download | bcm5719-llvm-1f8a99a9ae8c22ac1c90ee623d132ca0ee4bc0f5.tar.gz bcm5719-llvm-1f8a99a9ae8c22ac1c90ee623d132ca0ee4bc0f5.zip | |
IR: Expose ModuleSlotTracker in Value::print()
Allow callers of `Value::print()` and `Metadata::print()` to pass in a
`ModuleSlotTracker`. This allows them to pay only once for calculating
module-level slots (such as Metadata).
This is related to PR23865, where there was a huge cost for
`MachineFunction::print()`. Although I don't have a *particular* user
in mind for this new code, I have hit big slowdowns before when running
`opt -debug`, and I think this will be useful. Going forward, if
someone hits a big slowdown with `print()` statements, they can create a
`ModuleSlotTracker` and send it through. Similarly, adding support to
`Value::dump()` and `Metadata::dump()` should be trivial.
I added unit tests to be sure the `print()` functions actually behave
the same way with and without the slot tracker.
llvm-svn: 240867
Diffstat (limited to 'llvm/lib/IR/DebugInfoMetadata.cpp')
0 files changed, 0 insertions, 0 deletions

