- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
JIT: Optimize struct parameter register accesses in the backend #110819
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
          
     Merged
      
      
            jakobbotsch
  merged 40 commits into
  dotnet:main
from
jakobbotsch:physical-promotion-parameters-abi
  
      
      
   
  Feb 11, 2025 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            40 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      794536f
              
                Foo
              
              
                jakobbotsch db15f94
              
                Remove optimization for now
              
              
                jakobbotsch 8e8c913
              
                Add an lvTracked check, remove dead code
              
              
                jakobbotsch e504b4b
              
                Support insertions for now
              
              
                jakobbotsch bf196bd
              
                Run jit-format
              
              
                jakobbotsch 559baf0
              
                Avoid homing Swift parameters if they are !lvOnFrame
              
              
                jakobbotsch 6d1b57e
              
                Rename
              
              
                jakobbotsch 058e8dc
              
                JIT: Optimize struct parameter register accesses in the backend
              
              
                jakobbotsch 5f626ab
              
                Parameters in OSR functions cannot be mapped
              
              
                jakobbotsch 1283951
              
                Fix build on platforms with implicit byrefs, run jit-format
              
              
                jakobbotsch 0792ab5
              
                Spill to both parameter and new mappings
              
              
                jakobbotsch 3279c71
              
                Fix arm32 build
              
              
                jakobbotsch 2b8cf74
              
                Induce mappings before lowering runs
              
              
                jakobbotsch 22b755d
              
                Avoid double lowering, always back to nop
              
              
                jakobbotsch 43f6ba3
              
                Add check for DNER when reusing local
              
              
                jakobbotsch 1d3aba6
              
                Add function header
              
              
                jakobbotsch 6f21d49
              
                Ensure we check both the parameter and mapped target when determining…
              
              
                jakobbotsch 4f89b1a
              
                Change a lcl description
              
              
                jakobbotsch e47919d
              
                Skip promoted locals for optimization
              
              
                jakobbotsch cfff900
              
                Unify Swift parameter register homing
              
              
                jakobbotsch f0e6d2d
              
                Run jit-format
              
              
                jakobbotsch 4f06d3c
              
                Skip optimization for arm32 prespilled registers
              
              
                jakobbotsch 1c9bd2c
              
                Merge branch 'main' of github.com:dotnet/runtime into physical-promot…
              
              
                jakobbotsch 3903dae
              
                Clean up after merge
              
              
                jakobbotsch 2d683e0
              
                Run jit-format
              
              
                jakobbotsch 0db299f
              
                Attach info to reused temps
              
              
                jakobbotsch 9a23ca3
              
                Run jit-format
              
              
                jakobbotsch 8a6edaf
              
                Add quick early-out that avoids IR walk of first BB
              
              
                jakobbotsch 9b40281
              
                Avoid introducing new locals when it needs a callee save
              
              
                jakobbotsch fc8fa5e
              
                Run jit-format
              
              
                jakobbotsch 2f4b176
              
                Fix local var dump output length for frame locs
              
              
                jakobbotsch bb7eb9f
              
                JIT: Unify Swift parameter register homing with normal homing
              
              
                jakobbotsch 1ceb64c
              
                Fix store size for Swift CC
              
              
                jakobbotsch 84101a1
              
                Run jit-format
              
              
                jakobbotsch aa7e6a5
              
                Allow homing prespilled registers on arm32
              
              
                jakobbotsch 62289d7
              
                Skip induced parameter register locals for profiler hook on arm32
              
              
                jakobbotsch eeaaaf4
              
                Merge branch 'main' into physical-promotion-parameters-abi
              
              
                jakobbotsch 151cddd
              
                Do placed arg LSRA opt for PUTARG_SPLIT
              
              
                jakobbotsch 95d2b04
              
                Run jit-format
              
              
                jakobbotsch a5289d6
              
                Add liveness info to JITDUMP
              
              
                jakobbotsch File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -10412,7 +10412,7 @@ JITDBGAPI void __cdecl dVN(ValueNum vn) | |
| cVN(JitTls::GetCompiler(), vn); | ||
| } | ||
|  | ||
| JITDBGAPI void __cdecl dRegMask(regMaskTP mask) | ||
| JITDBGAPI void __cdecl dRegMask(const regMaskTP& mask) | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function was not working for me for ARM64 because  | ||
| { | ||
| static unsigned sequenceNumber = 0; // separate calls with a number to indicate this function has been called | ||
| printf("===================================================================== dRegMask %u\n", sequenceNumber++); | ||
|  | ||
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  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.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't recall why I commented this, will uncomment and make sure it doesn't trigger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually let me do that in a follow-up. The problem is that LSRA is expecting these mappings to exist even for OSR functions, since it gets used to pick an initial preferred register. That doesn't really make sense for OSR functions, but changing that will come with diffs, so I don't think it should be done here.