Commit Graph

5 Commits

Author SHA1 Message Date
Hamish Knight
bb48233695 [Profiler] Avoid recording empty regions
These are redundant.
2023-11-16 17:28:57 +00:00
Hamish Knight
350e28b4b7 [Profiler] Rework profiling of top-level code
Instead of creating and destroying a SILProfiler
per TopLevelCodeDecl, setup a single profiler
for the top-level entry point function, and visit
all the TopLevelCodeDecls when mapping regions.
2022-10-14 17:45:14 +01:00
Vedant Kumar
cfd38c42a1 [Profiler] Assign counter to IfStmt condition
Push a region to cover any expressions within an IfStmt condition.

rdar://67280997
2020-08-18 14:05:24 -07:00
Slava Pestov
45330816b4 Profile: Run tests through to -emit-ir to get better coverage 2020-03-17 19:03:03 -04:00
Vedant Kumar
c3f4d99e57 Group the the code coverage, profiling, and pgo tests together (#16070)
* Group tests for profiling instrumentation together, NFC

This will make it easier to test changes to the code coverage logic.

There are a handful of tests which relate to profiling which I have not
moved. These include tests for the driver and for the SIL optimizer. It
makes more sense to keep those tests where they are.

* Rename a test file, NFC

This file tests code coverage of primary files, so I've changed the name
of the file to reflect that.

* Simplify the check lines in a test, NFC

This file tests code coverage of closures. It had several check lines
which obscured the meaning of the test, and its check lines were in a
strange order.

Remove the extra checks and disable -emit-sorted-sil.
2018-04-20 15:15:52 -07:00