Skip to content
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

spirv-opt: Add specific handling of vulkan debug info differences #4398

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

greg-lunarg
Copy link
Contributor

No description provided.

@jaebaek jaebaek self-requested a review July 26, 2021 02:25
Copy link
Contributor

@jaebaek jaebaek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change contains four functional components

  1. disallow forward reference for non-semantic debug info
  2. handle DebugFunctionDefinition in the function inline pass
  3. handle non-semantic debug info in IR loader
  4. handle non-semantic debug info in binary dump

Could you break them up into four PR?

@@ -403,6 +403,14 @@ bool InlinePass::InlineEntryBlock(
callee2caller, inlined_at_ctx, new_blk_ptr, callee_first_block);

while (callee_inst_itr != callee_first_block->end()) {
// don't inline function definition links, the calling function is not a
// definition
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    // Don't inline function definition links, the calling function is not a
    // definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

default: {
Errorf(consumer_, src, loc,
"Debug info extension instruction other than DebugScope, "
"DebugNoScope, DebugDeclare, and DebugValue found inside "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not contain DebugFunctionDefinition.

Debug info extension instruction other than DebugScope, DebugNoScope, DebugDeclare, DebugValue, and DebugFunctionDefinition found inside ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

scope.ToBinary(dbg_inst->type_id(), context()->TakeNextId(),
dbg_inst->GetSingleWordOperand(2), binary);
// don't emit scope changes when outside of blocks in
// Vulkan.NonSemantic.DebugInfo.100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot understand this comment. Could you please rephrase it?
In addition, please start the sentence with a large character instead of a small one e.g., Don't .. instead of don't
and end the sentence with a dot ..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nonsemantic instructions cannot be emitted before any phi instructions in a block. This logic will make sure scope instructions are emitted after any phi instructions in a block for Vulkan.NonSemantic.DebugInfo.100. I have updated the comment to make this clearer.

@greg-lunarg
Copy link
Contributor Author

I think I have addressed all current concerns regarding comments and error messages.

Could you break them up into four PR?

Yes I could and I will if you want me to, although I would request that in the name of expediency we move ahead with these as is and not go through the extra work of creating separate PRs. I would suggest that these changes are all related since they all have the goal of enabling processing of Vulkan debug info. Since Vulkan debug info processing is dependent on all of these, they really are not very useful independently and thus very little would be gained by breaking them up.

If you still feel there is value in splitting these, let me know and I will do that.

@jaebaek
Copy link
Contributor

jaebaek commented Jul 28, 2021

Ok. I will approve this PR. I rerun the CI-macos-clang-debug test. I will submit it when the test passes.

@greg-lunarg
Copy link
Contributor Author

Thanks Jaebaek! Looks like it passed.

@jaebaek jaebaek merged commit 983ee23 into KhronosGroup:master Jul 29, 2021
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.

3 participants