Skip to content

[SILGen] Make sure profile increments gets assigned the correct scope. #21620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

dcci
Copy link
Member

@dcci dcci commented Jan 3, 2019

rdar://problem/46686369

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@dcci
Copy link
Member Author

dcci commented Jan 3, 2019

@swift-ci please test

@dcci
Copy link
Member Author

dcci commented Jan 3, 2019

Turns out that order matters (TM), so I need to think about something else.

@swift-ci
Copy link
Contributor

swift-ci commented Jan 4, 2019

Build failed
Swift Test OS X Platform
Git Sha - a6db5e9

@vedantk
Copy link
Contributor

vedantk commented Jan 4, 2019

Yes, I think the increment must occur before the statement body is emitted, otherwise control flow changes within the body might result in missed increments.

Would applying a line 0 location to the profile counter increment address the verifier failure?

@dcci
Copy link
Member Author

dcci commented Jan 8, 2019

@vedantk @adrian-prantl
while I agree that applying line zero to the increment a good thing to do, I don't think it's going to fix the verifier failure. Is there an equivalent of line 0 for scopes? I'm not aware of it.

Aside, maybe the verifier should skip instructions with a compiler generated line?

@adrian-prantl
Copy link
Contributor

adrian-prantl commented Jan 8, 2019

@vedantk @adrian-prantl
while I agree that applying line zero to the increment a good thing to do, I don't think it's going to fix the verifier failure. Is there an equivalent of line 0 for scopes? I'm not aware of it.

The "equivalent" is using SILBuildWithScope<>(insertionpoint) which inherits the scope from the insertion point.

Aside, maybe the verifier should skip instructions with a compiler generated line?

Probably not, they will still bloat .debug_info needlessly.

@dcci dcci closed this Jan 11, 2019
@dcci
Copy link
Member Author

dcci commented Jan 11, 2019

Superseded by #21777

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.

4 participants