Commit Graph

10 Commits

Author SHA1 Message Date
Vedant Kumar
992d3aae15 [IRGen] Fix lowering of int_instrprof_increment
Update our usage of llvm's coverage API and fix the way we lower
instrprof_increment intrinsics.

This keeps us up-to-date with llvm/stable and makes instrumented IR
easier to read.
2016-02-15 15:49:38 -08:00
Chris Lattner
7f0caa2223 silience some unused code warnings. 2016-02-08 11:21:41 -08:00
practicalswift
a764144ff5 [gardening] llvm/ProfileData/InstrProf.h included twice. 2016-02-07 21:40:30 +01:00
Michael Gottesman
68ac0fd0d1 Temporarily disable Coverage generation until I can get someone to look at it. It seems that the coverage code in LLVM is completely changed. 2016-02-06 11:22:27 -08:00
Vedant Kumar
efb8135f36 [Coverage] Use new definitions from InstrProf.h
Changes to the coverage mapping API in upstream llvm have caused merge
conflicts and breakage in swift. This commit phases in bits of the new
API in a way that can be safely cherry-picked to swift-{2.2,3.0}-branch.

This commit is NFC for master-next and swift-2.2-branch, but constitutes
an actual bugfix for 3.0. That's because 3.0 is paired with a version of
llvm that takes advantage of the new coverage API to reduce the size of
instrumented binaries.

This effectively closes Swift PR-1053.

(cherry picked from commit a079d313fe)
2016-02-01 12:29:42 -08:00
Vedant Kumar
df0fd36651 [Coverage] Fix function mapping record emission
We emit an extra byte in the name field of function mapping records. The
extra null byte confuses llvm InstrProfReader, resulting in a loss of
coverage information.

We need execution tests to prevent this sort of issue from arising in
the future. Before that can happen, swift needs to start maintaining its
own branches of compiler-rt (this is SR-601).

Swift PR 1051, rdar://problem/24267336

(cherry picked from commit a476c2828a)
2016-01-25 13:58:08 -08:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Justin Bogner
8d9180e01e InstrProf: Match clang's behaviour and pack this struct
rdar://problem/21567538

Swift SVN r29900
2015-07-02 21:21:02 +00:00
Justin Bogner
322005d027 InstrProf: Track the filename in coverage maps
If multiple swift files are compiled together, then guessing as to the
file when we emit IR obviously doesn't work. Find the filename when we
generate a function's coverage map and propagate it through SIL.

Swift SVN r25436
2015-02-20 21:26:20 +00:00
Justin Bogner
59bb06b0fb InstrProf: SIL-level coverage mapping and lowering to LLVM
The adds the sil_coveragemap construct to SIL and the needed IRGen to
turn these into LLVM's coverage maps.

Swift SVN r25210
2015-02-12 00:28:39 +00:00