Shared: Fix bad join boundedPhiRankStep#20576
Closed
MathiasVP wants to merge 1 commit intogithub:mainfrom
Closed
Conversation
```
Pipeline standard for RangeAnalysisImpl::ConstantStage::boundedPhiRankStep/8#99a39015@cc6f89w5 was evaluated in 8990 iterations totaling 85259ms (delta sizes total: 721932).
685940 ~0% {9} r1 = SCAN `RangeAnalysisImpl::ConstantStage::boundedPhiRankStep/8#99a39015#prev_delta` OUTPUT In.0, In.1, In.2, In.3, In.4, In.5, In.6, _, In.7
685940 ~0% {8} | REWRITE WITH Tmp.7 := 1, Out.7 := (Tmp.7 + In.8) KEEPING 8
2160316026 ~1% {10} | JOIN WITH `RangeAnalysisImpl::ConstantStage::boundedPhiCandValidForEdge/9#17e05352#prev` ON FIRST 7 OUTPUT Lhs.0, Rhs.7, Rhs.8, Lhs.7, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6
613801 ~7% {8} | JOIN WITH `RangeUtils::MakeUtils<SemanticLocation::SemLocation,RangeAnalysisImpl::Sem,FloatDelta::FloatDelta>::rankedPhiInput/4#d3c444f0` ON FIRST 4 OUTPUT Lhs.0, Lhs.4, Lhs.5, Lhs.6, Lhs.7, Lhs.8, Lhs.9, Lhs.3
44172265 ~0% {9} r2 = SCAN `RangeAnalysisImpl::ConstantStage::boundedPhiCandValidForEdge/9#17e05352#prev_delta` OUTPUT In.0, In.7, In.8, In.1, In.2, In.3, In.4, In.5, In.6
44172265 ~0% {9} r3 = JOIN r2 WITH `RangeUtils::MakeUtils<SemanticLocation::SemLocation,RangeAnalysisImpl::Sem,FloatDelta::FloatDelta>::rankedPhiInput/4#d3c444f0` ON FIRST 3 OUTPUT Lhs.0, Lhs.3, Lhs.4, Lhs.5, Lhs.6, Lhs.7, Lhs.8, _, Rhs.3
44172265 ~0% {9} | REWRITE WITH Tmp.7 := 1, Out.7 := (InOut.8 - Tmp.7)
4135 ~0% {8} | JOIN WITH `RangeAnalysisImpl::ConstantStage::boundedPhiRankStep/8#99a39015#prev` ON FIRST 8 OUTPUT Lhs.0, Lhs.1, Lhs.2, Lhs.3, Lhs.4, Lhs.5, Lhs.6, Lhs.8
44172265 ~0% {11} r4 = JOIN r2 WITH `RangeUtils::MakeUtils<SemanticLocation::SemLocation,RangeAnalysisImpl::Sem,FloatDelta::FloatDelta>::rankedPhiInput/4#d3c444f0` ON FIRST 3 OUTPUT Lhs.0, Lhs.3, Lhs.4, Lhs.5, Lhs.6, Lhs.7, Lhs.8, Lhs.1, Lhs.2, Rhs.3, _
{10} | REWRITE WITH Tmp.10 := 1, TEST InOut.9 = Tmp.10 KEEPING 10
119942 ~16% {10} | SCAN OUTPUT In.0, In.7, In.8, _, In.1, In.2, In.3, In.4, In.5, In.6
119942 ~17% {10} | REWRITE WITH Out.3 := 1
119942 ~24% {8} | JOIN WITH `RangeUtils::MakeUtils<SemanticLocation::SemLocation,RangeAnalysisImpl::Sem,FloatDelta::FloatDelta>::rankedPhiInput/4#d3c444f0` ON FIRST 4 OUTPUT Lhs.0, Lhs.4, Lhs.5, Lhs.6, Lhs.7, Lhs.8, Lhs.9, _
119942 ~22% {8} | REWRITE WITH Out.7 := 1
737878 ~9% {8} r5 = r1 UNION r3 UNION r4
721932 ~6% {8} | AND NOT `RangeAnalysisImpl::ConstantStage::boundedPhiRankStep/8#99a39015#prev`(FIRST 8)
return r5
```
boundedPhiRankStepboundedPhiRankStep
Contributor
|
Obviously the posted "After" order is much better, but this looks like a fix-by-coincidence to me. I don't see anything in the added binding pragmas that's in any way preventing the bad order. From the posted join-orders, the problem is quite clear to me, though, so let me see if I can write a better alternative. |
Contributor
|
This fix here #20579 should be much better, I think. |
Contributor
Author
|
I've merged your fix, Schack. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before (when running
cpp/invalid-pointer-derefon neovim):After: