llvm-project/clang/test/CoverageMapping
Justin Bogner f59329b083 InstrProf: Avoid repeated linear searches in a hot path
When generating coverage regions, we were doing a linear search
through the existing regions in order to try to merge related ones.
Most of the time this would find what it was looking for in a small
number of steps and it wasn't a big deal, but in cases with many
regions and few mergeable ones this leads to an absurd compile time
regression.

This changes the coverage mapping logic to do a single sort and then
merge as we go, which is a bit simpler and about 100 times faster.
I've also added FIXMEs on a couple of behaviours that seem a little
suspect, while keeping them behaving as they were - I'll look into
these soon.

The test changes here are mostly tedious reorganization, because the
ordering of regions we output has become slightly (but not completely)
more consistent from the almost completely arbitrary ordering we got
before.

llvm-svn: 218738
2014-10-01 03:33:52 +00:00
..
Inputs Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
break.c Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
builtinmacro.c Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
casts.c Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
classtemplate.cpp Test: CoverageMapping: use "RUN: FileCheck" command instead of "RUN: cat | Filecheck". 2014-08-20 17:29:47 +00:00
continue.c Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
header.cpp Test: CoverageMapping: use "RUN: FileCheck" command instead of "RUN: cat | Filecheck". 2014-08-20 17:29:47 +00:00
if.c Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
includehell.cpp InstrProf: Avoid repeated linear searches in a hot path 2014-10-01 03:33:52 +00:00
ir.c Coverage Mapping: store function's hash in coverage function records. 2014-08-21 19:25:27 +00:00
label.cpp Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
logical.cpp Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
loopmacro.c InstrProf: Avoid repeated linear searches in a hot path 2014-10-01 03:33:52 +00:00
loops.cpp Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
macroception.c InstrProf: Avoid repeated linear searches in a hot path 2014-10-01 03:33:52 +00:00
macroparams.c InstrProf: Avoid repeated linear searches in a hot path 2014-10-01 03:33:52 +00:00
macroparams2.c Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
macros.c Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
nestedclass.cpp Test: CoverageMapping: use "RUN: FileCheck" command instead of "RUN: cat | Filecheck". 2014-08-20 17:29:47 +00:00
objc.m Coverage mapping: fix mapping for objective-c for statement 2014-08-20 17:11:53 +00:00
preprocessor.c Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
return.c Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
switch.c Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
templates.cpp Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
test.c Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00
trycatch.cpp Add tests for coverage mapping generation. 2014-08-19 17:32:30 +00:00