HomePhabricator

[NFC] Fix performance issue in LiveDebugVariables

Authored by Orlando on Apr 2 2020, 12:41 AM.

Description

[NFC] Fix performance issue in LiveDebugVariables

When compiling AMDGPUDisassembler.cpp in a stage 1 trunk build with
CMAKE_BUILD_TYPE=RelWithDebInfo LLVM_USE_SANITIZER=Address LiveDebugVariables
accounts for 21.5% wall clock time. This fix reduces that to 1.2% by switching
out a linked list lookup with a map lookup.

Note that the linked list is still used to group UserValues by vreg. The vreg
lookups don't cause any problems in this pathological case.

This is the same idea as D68816, which was reverted, except that it is a less
intrusive fix.

Reviewed By: vsk

Differential Revision: https://reviews.llvm.org/D77226

Details

Committed
OrlandoApr 2 2020, 1:39 AM
Reviewer
vsk
Differential Revision
D77226: [NFC] Fix performance issue in LiveDebugVariables
Parents
rG29d253c4c687: [Object] Add the method for checking if a section is a debug section
Branches
Unknown
Tags
Unknown