JIT: Tail-merge don't produce empty blocks#129092
Open
BoyBaykiller wants to merge 1 commit into
Open
Conversation
…ases like optimizeBools
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
Author
|
This itself has some interesting regressions related to how the backend deals with the block layout. I see cases like this where we get weird unnecessary jumps. G_M48648_IG02: ;; offset=0x0000
vucomiss xmm0, xmm1
jp SHORT G_M48648_IG03
je SHORT G_M48648_IG08
;; size=8 bbWeight=1 PerfScore 4.00
G_M48648_IG03: ;; offset=0x0008
vucomiss xmm0, xmm0
jp SHORT G_M48648_IG04
vucomiss xmm0, xmm1
jbe SHORT G_M48648_IG07
;; size=12 bbWeight=1 PerfScore 6.00
G_M48648_IG04: ;; offset=0x0014
vmovaps xmm1, xmm0
;; size=4 bbWeight=1 PerfScore 0.25
G_M48648_IG05: ;; offset=0x0018
vmovaps xmm0, xmm1
;; size=4 bbWeight=1 PerfScore 0.25
G_M48648_IG06: ;; offset=0x001C
ret
;; size=1 bbWeight=1 PerfScore 1.00
G_M48648_IG07: ;; offset=0x001D
jmp SHORT G_M48648_IG05
;; size=2 bbWeight=0 PerfScore 0.00
G_M48648_IG08: ;; offset=0x001F
vmovd eax, xmm1
test eax, eax
jl SHORT G_M48648_IG04
jmp SHORT G_M48648_IG07
;; size=10 bbWeight=0 PerfScore 0.00 |
Contributor
Author
|
@AndyAyersMS PTAL. |
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.
I had an other change for improving the
crossJumpVictimselection logic in tail-merge, but it had random regressions because downstream phases get confused depending on where empty blocks are. This PR stops producing empty blocks in tail-merge which fixes that.It also makes sense given how we are running directly after "optimize control flow" phase which just got rid of all empty blocks.