-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JIT: Generalize parameter register to local mapping in the backend (#…
…110795) This PR generalizes the backend's treatment of which parameter registers are mapped to which locals. Before this PR, parameter locals implicitly are defined from the incoming parameter registers/stack. For old promotion, the backend then knows that some registers can be mapped cleanly into the fields of those promoted locals, allowing for efficient handling of structs passed in registers. This PR adds an explicit data structure that indicates if the backend needs to make any special mappings for parameter registers. The data structure maps incoming register segments to locals. The PR changes the backend to use this data structure as follows: - Lowering is changed to create these mapping for old promoted local struct fields - LSRA is changed to consult the mappings when building definitions for parameters - Codegen is changed to consult the mappings when physically generating the code that moves incoming parameter registers to their corresponding local In the future, the lowering part can be changed to recognize and optimize IR in the initial block when it looks like creating more mappings will be beneficial. The IR physical promotion creates will allow this optimization to kick in.
- Loading branch information
1 parent
aa190d6
commit b6038a4
Showing
12 changed files
with
334 additions
and
348 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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.