Updated code after 2025 Feb 24th code review#129
Open
jestrang wants to merge 4 commits intoaayasin:masterfrom
Open
Updated code after 2025 Feb 24th code review#129jestrang wants to merge 4 commits intoaayasin:masterfrom
jestrang wants to merge 4 commits intoaayasin:masterfrom
Conversation
Collaborator
There was a problem hiding this comment.
All these additional kernel files should not be here, please remove them.
| Insts_MRN = ['%s non-MRNable'%x for x in ['INC','DEC','LD-ST']] | ||
| Insts_V2II2V = ['%s transition-Penalty'%x for x in ['V2I','I2V']] | ||
| Insts_all = ['cond_%s'%x for x in Insts_cond] + Insts_Fusions + Insts_MRN + Insts_V2II2V + Insts_global | ||
| Insts_MovElim = ['%s move-elimination'%x for x in ['r32','r64','xmm','ymm','zmm']] |
Collaborator
There was a problem hiding this comment.
R23, R64, XMM, YMM, ZMM is better (capitals).
| elif v2ii2v_dst: inc_stat('V2I transition-Penalty') | ||
| if x86.is_type(x86.MOV,line) and not info.is_memory() and not info.is_imm() and not re.match(info.inst(),x86.MOVS_ZX): | ||
| me_src=info.srcs()[0] | ||
| me_dst=info.dst() |
Collaborator
There was a problem hiding this comment.
No need for the me_dst.
| elif 'ymm' in me_src: | ||
| inc_stat('ymm move-elimination') | ||
| elif 'zmm' in me_src: | ||
| inc_stat('zmm move-elimination') |
Collaborator
There was a problem hiding this comment.
Re-write this block without duplicating the 'move elimination' string, maybe one long line (removing all the code inside this part, try it):
inc_stat(f'{"R64" if me_src in x86.REGS_64 else "R23" if me_src in x86.REGS_32 else "XMM" if "xmm" in me_src else "YMM" if "ymm" in me_src else "ZMM"} move elimination')
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.
Highlights: