Skip to content

Commit

Permalink
Some VN refactoring (#61034)
Browse files Browse the repository at this point in the history
* Remove "block" from VNApplySelectorsAssign

It was unused and all the callers passed the current block anyway.

Also some renaming to make Assign and AssignTypeCoerce methods consistent.

* Improve the readability of VNForMapStore

By naming parameters properly.

* Improve the readability of VNForMapSelect

By naming parameters properly.

* Pull ASG numbering out of fgValueNumberTree

In my upcoming substantive changes to this code the unreasonable level
of nesting started to significantly degrade the readability of code.

So, move it out of the main numbering function. The result is still
pretty huge and could be split up further, but this will do for now.

* Refactor VNApplySelectors

Make it use a loop instead of recursion.

Rename parameters to match the "Assign" variants.

Add standard header comments.
  • Loading branch information
SingleAccretion authored Nov 2, 2021
1 parent c690d27 commit 4e7cf80
Show file tree
Hide file tree
Showing 3 changed files with 746 additions and 745 deletions.
2 changes: 2 additions & 0 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -5465,6 +5465,8 @@ class Compiler
// assignment.)
void fgValueNumberTree(GenTree* tree);

void fgValueNumberAssignment(GenTreeOp* tree);

// Does value-numbering for a block assignment.
void fgValueNumberBlockAssignment(GenTree* tree);

Expand Down
Loading

0 comments on commit 4e7cf80

Please sign in to comment.