Skip to content

Conversation

@vedantk
Copy link
Contributor

@vedantk vedantk commented May 14, 2018

This adds a test case to exercise a path in IRGen which discards
ill-formed profiling intrinsics.

The reason that path exists is because SIL optimizations may rewrite profiling intrinsics in a way that IRGen can't understand. Essentially IRGen would need to undo the optimizations in order to gather information needed to emit the right LLVM IR.

Eventually I'd like to fix this by adding a SIL verifier check to make sure SIL optimizations don't touch profiling intrinsics (see: r://39146527), but we need to avoid generating incorrect binaries right away.

rdar://40133800

@vedantk
Copy link
Contributor Author

vedantk commented May 14, 2018

@swift-ci Please smoke test

@vedantk
Copy link
Contributor Author

vedantk commented May 14, 2018

Hi @shajrawi & @slavapestov, could one of you please review this when you have a moment?

@vedantk
Copy link
Contributor Author

vedantk commented May 14, 2018

(This is a follow-up to: #16522)

vedantk added 2 commits May 14, 2018 13:49
This adds SIL printer/parser support for SILCoverageMaps representing
top-level code decls.
This adds a test case to exercise a path in IRGen which discards
ill-formed profiling intrinsics.

rdar://40133800 & r://39146527
@vedantk vedantk force-pushed the cov-symtab-test branch from c0acafc to 39194a8 Compare May 14, 2018 20:49
@vedantk
Copy link
Contributor Author

vedantk commented May 14, 2018

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - c0acafcc1e3bfdba0645d106065f5e7e8e388ce0

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - c0acafcc1e3bfdba0645d106065f5e7e8e388ce0

@vedantk
Copy link
Contributor Author

vedantk commented May 14, 2018

@swift-ci Please smoke test OS X platform

@vedantk
Copy link
Contributor Author

vedantk commented May 15, 2018

Davide lgtm'd this in #16610.

@vedantk vedantk merged commit d71d3fb into swiftlang:master May 15, 2018
kitasuke pushed a commit to kitasuke/swift that referenced this pull request Jun 9, 2018
…tlang#16607)

* [Coverage] Parse SIL coverage maps for top-level code decls

This adds SIL printer/parser support for SILCoverageMaps representing
top-level code decls.

* [Coverage] Test lowering of ill-formed SIL profiling intrinsics

This adds a test case to exercise a path in IRGen which discards
ill-formed profiling intrinsics.

rdar://40133800 & r://39146527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants