- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.2k
 
[JIT] Add support to inline the field access of primitive types marked with TLS #82973
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
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            93 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      327b8f6
              
                Add CORINFO_THREAD_LOCAL_FIELD_INFO and getThreadLocalFieldInfo()
              
              
                kunalspathak 51644e2
              
                Implementation of getThreadLocalFieldInfo()
              
              
                kunalspathak 8aef324
              
                Change the field types from CORINFO_CONST_LOOKUP to uint32_t
              
              
                kunalspathak 916482b
              
                Introduce CORINFO_FIELD_STATIC_TLS_MANAGED
              
              
                kunalspathak 6eaa3d9
              
                Introduce GTF_FLD_TLS_MANAGED
              
              
                kunalspathak efbb53d
              
                Introduce eeGetThreadLocalFieldInfo()
              
              
                kunalspathak f3fc3a2
              
                Fix the offsetOfThreadStaticBlocks, hardcode threadStaticBlockIndex f…
              
              
                kunalspathak ca4caad
              
                Add impThreadLocalFieldAccess()
              
              
                kunalspathak 8fd9f58
              
                Switch to GS segment register with a TODO
              
              
                kunalspathak b0bf47f
              
                Add reverse map `g_threadStaticBlockTypeIDMap` for type -> ID
              
              
                kunalspathak 3796c73
              
                Fix GS segment register encoding
              
              
                kunalspathak 50c5e95
              
                Add comment for g_threadStaticBlockTypeIDMap
              
              
                kunalspathak 8d0c3a9
              
                Add extra parameter for typeIndex in JIT_GetSharedNonGCThreadStaticBase
              
              
                kunalspathak 45ddb20
              
                Update JIT_GetSharedNonGCThreadStaticBase to add logic for storing ty…
              
              
                kunalspathak 8ca4999
              
                Fix encoding of gs:[0x58]
              
              
                kunalspathak 93a70a1
              
                fix some bugs in importer to change size from 4 to 8
              
              
                kunalspathak a0e40f0
              
                add some printf in jithelpers
              
              
                kunalspathak e6bdd82
              
                To revert
              
              
                kunalspathak 8548500
              
                Merge remote-tracking branch 'origin/main' into tls
              
              
                kunalspathak f3bca52
              
                Update the helper to skip making re-entry for staticBlock
              
              
                kunalspathak 93702e3
              
                Add impThreadLocalFieldWrite() for store
              
              
                kunalspathak a607458
              
                Fix a issue for helper
              
              
                kunalspathak c331a68
              
                Use JITDUMP
              
              
                kunalspathak a96745f
              
                Merge remote-tracking branch 'origin/main' into tls
              
              
                kunalspathak b3e1038
              
                Just enable the optimization for primitive types
              
              
                kunalspathak 3a20176
              
                Update the JITEE guid
              
              
                kunalspathak db09d6f
              
                Fix an assert for volatile variables
              
              
                kunalspathak 58cdade
              
                Mark helper block as cold block
              
              
                kunalspathak a138959
              
                wip
              
              
                kunalspathak 8d0d6a7
              
                Fix the size of maxThreadStaticBlock
              
              
                kunalspathak e372a95
              
                fix a bug to insert the entry in cache
              
              
                kunalspathak b273fe6
              
                Add #ifdef for HOST_WINDOWS / TARGET_WINDOWS
              
              
                kunalspathak 9584257
              
                Dynamic memory allocation for static block array
              
              
                kunalspathak d0bbf56
              
                Call InitTypeMap only if host == windows
              
              
                kunalspathak 6e10e7d
              
                Add CORINFO_HELP_GETSHARED_NONGCTHREADSTATIC_BASE_NOCTOR_OPTIMIZED
              
              
                kunalspathak c5266da
              
                Merge remote-tracking branch 'origin/main' into tls
              
              
                kunalspathak 360ab8c
              
                Expand the TLS field access in late phase
              
              
                kunalspathak 3dfb3d2
              
                Move rarely ran block to the end
              
              
                kunalspathak 0e3daaa
              
                wip
              
              
                kunalspathak 7f59353
              
                Fix the bug to access the value from fastPath
              
              
                kunalspathak e618aee
              
                Remove code from importer
              
              
                kunalspathak 2b0629d
              
                Cleanup the code
              
              
                kunalspathak a4bb8dd
              
                Moved CreateBlockFromTree to fgbasic.cpp
              
              
                kunalspathak bad7fb3
              
                Move fgExpandThreadLocalAccess() to flowgraph.cpp
              
              
                kunalspathak e094f29
              
                Add getThreadLocalStaticBlocksInfo() method
              
              
                kunalspathak 7b9de56
              
                Consume getThreadLocalStaticBlocksInfo() method
              
              
                kunalspathak 781e25e
              
                Updated definition of getThreadLocalFieldInfo()
              
              
                kunalspathak f774eb5
              
                Rename CORINFO_THREAD_LOCAL_FIELD_INFO to CORINFO_THREAD_STATIC_BLOCK…
              
              
                kunalspathak 76cbaa1
              
                Add TARGET_WINDOWS
              
              
                kunalspathak 097a2d4
              
                Make TARGET_WINDOWS at some definitions
              
              
                kunalspathak d718156
              
                Add dummy definition for unix
              
              
                kunalspathak 20f2e90
              
                jit format
              
              
                kunalspathak 612187e
              
                Merge remote-tracking branch 'origin/main' into tls
              
              
                kunalspathak 69f64cf
              
                remote unnecessary code from morph
              
              
                kunalspathak 5e53c84
              
                Fix an issue on linux, add assert for tls_index != 0
              
              
                kunalspathak 5f4b971
              
                Convert from TARGET_WINDOWS to HOST_WINDOWS
              
              
                kunalspathak 8f61268
              
                jit format
              
              
                kunalspathak c3b3c83
              
                fix the if-check
              
              
                kunalspathak 91f6a8a
              
                fix gcc build error
              
              
                kunalspathak 25c04d5
              
                Added MethodHaveTlsFieldAccess()
              
              
                kunalspathak 90103a1
              
                Handle the case for '_tls_index == 0'
              
              
                kunalspathak 90af395
              
                fix a typo
              
              
                kunalspathak 66f6401
              
                Fix windows/arm64 issue
              
              
                kunalspathak 3cd2881
              
                fix encoding of teb loading for arm64
              
              
                kunalspathak 055b9e0
              
                Fix the condition in jitinterface to select correct helper
              
              
                kunalspathak c8ed0c6
              
                fix the condition for other helper too
              
              
                kunalspathak ab98131
              
                fix the windows/x86 case
              
              
                kunalspathak 6c9264f
              
                Merge remote-tracking branch 'origin/main' into tls
              
              
                kunalspathak d085acd
              
                jit format
              
              
                kunalspathak f08fbd3
              
                Use CORINFO_CONST_LOOKUP for _tls_index
              
              
                kunalspathak a81c4b9
              
                Move typeIdMap to BaseDomain class
              
              
                kunalspathak 18e6b46
              
                Introduce useFatPointerDispatch parameter for GetTypeID()
              
              
                kunalspathak d23a0b2
              
                jit format
              
              
                kunalspathak 1aea091
              
                Do not pass classID and moduleID to the new helper
              
              
                kunalspathak 19bb28a
              
                fix build for non-windows
              
              
                kunalspathak 7dc2d6e
              
                fix superpmi methods
              
              
                kunalspathak 2d76689
              
                review feedback
              
              
                kunalspathak 79e0351
              
                fix linux build errors
              
              
                kunalspathak 1f2a353
              
                review feedback
              
              
                kunalspathak c0de86f
              
                fix weight inherit
              
              
                kunalspathak 52f98c5
              
                inline JIT_GetNonGCThreadStaticBase_Helper to fix the contract error
              
              
                kunalspathak cdd79fd
              
                Remove dead code from helper
              
              
                kunalspathak bdc67fe
              
                Add GTF_CALL_M_EXP_TLS_ACCESS to check if we do not revisit the alrea…
              
              
                kunalspathak c9858d4
              
                address feedback
              
              
                kunalspathak a7d290f
              
                Merge remote-tracking branch 'origin/main' into tls
              
              
                kunalspathak 4f20569
              
                regenerate the files
              
              
                kunalspathak 746fd04
              
                Introduce fgExpandHelper and fgExpandHelperForBlock and reuse it for …
              
              
                kunalspathak b734406
              
                fix the typo
              
              
                kunalspathak c67b085
              
                update the assert for runtimelookup
              
              
                kunalspathak fc6bb0c
              
                Merge remote-tracking branch 'origin/main' into tls
              
              
                kunalspathak 047a6ef
              
                check if we should skip rarely run blocks
              
              
                kunalspathak 30d19d9
              
                review feedback
              
              
                kunalspathak be29dcb
              
                Remove GTF_IND_INVARIANT from `typeIndex` access because it produces …
              
              
                kunalspathak 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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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.
        
    
  
  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.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.