Skip to content

reduce: fix loop to selection dominance query#2477

Merged
paulthomson merged 3 commits intoKhronosGroup:masterfrom
paulthomson:fix_loop_to_selection_dominance_query
Mar 26, 2019
Merged

reduce: fix loop to selection dominance query#2477
paulthomson merged 3 commits intoKhronosGroup:masterfrom
paulthomson:fix_loop_to_selection_dominance_query

Conversation

@paulthomson
Copy link
Copy Markdown
Contributor

@paulthomson paulthomson commented Mar 26, 2019

Fix #2457.

StructuredLoopToSelectionReductionOpportunity::FixNonDominatedIdUses considers every instruction in the function being modified and tries to fix dominance by checking the dominance of all uses. Unfortunately, some of these "uses" can be OpDecorate instructions that are outside of blocks, which causes a segfault.

@paulthomson paulthomson requested a review from afd March 26, 2019 13:37
Copy link
Copy Markdown
Contributor

@afd afd left a comment

Choose a reason for hiding this comment

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

The change looks good. My only question is whether the project has a preference for "if (p == nullptr)" vs. "if (!p)" - I don't have an opinion on which is preferable.

@paulthomson paulthomson merged commit fb07536 into KhronosGroup:master Mar 26, 2019
@paulthomson paulthomson deleted the fix_loop_to_selection_dominance_query branch March 26, 2019 16:37
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.

reduce: segfault caused by StructuredLoopToSelectionReductionOpportunity querying dominance information for instructions that are not within blocks

2 participants