Skip to content
Commit adc5456d authored by Duncan P. N. Exon Smith's avatar Duncan P. N. Exon Smith
Browse files

AsmWriter: Avoid O(N^2) processing of metadata

Fix embarrassing bugs I introduced to the `SlotTracker` in or around
r235785.  I had us iterating through every instruction in a function
(and hitting a map in the LLVMContext) for every basic block in the
function.

While there, completely avoid the call to
`SlotTracker::processFunctionMetadata()` from
`SlotTracker::processFunction()` if we've speculatively done this
already in `SlotTracker::processModule()` by checking
`ShouldInitializeAllMetadata` (this wasn't an algorithmic problem, but
it's touching the same line of code).

Fixes PR24699.

llvm-svn: 247372
parent 2bd08527
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment