Commit 08215c1d authored by Duncan P. N. Exon Smith's avatar Duncan P. N. Exon Smith
Browse files

Merging r247372 to 3.7 for inclusion in 3.7.1

------------------------------------------------------------------------
r247372 | dexonsmith | 2015-09-10 18:34:59 -0700 (Thu, 10 Sep 2015) | 15 lines

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: 247440
parent f01a09db
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment