Commit a9d67ec
JIT: Enable inlining for late devirtualization (#110827)
* Enable inlining for late devirt
* Pass correct IL offset
* Only creates RET_EXPR if the node is not top-level or not returning void
* Do not try inlining if BBF_INTERNAL is set
* Ensure the type matches
* Set inliner context correctly
* Address review feedbacks
* Fix non inline candidate marking
* Handle calls with retbuf
* Handle BBF_INTERNAL
* Get real type from local
* Always set IL offset
* Add comments
* Oops
* Use gtReturnType instead
* Remove unused ilOffset
* Use genActualType
* Remove unnecessary spillTemp
* Handle nested call correctly
* Don't promote compCurStmt
* Remove unused ilOffset
* Handle BBF_INTERNAL
* Use correct return type
* Use bbInCatchHandlerBBRange and bbInFilterBBRange
* Cleanup fncRetType
* Add a runtime check to prevent accidental execution order change
* Format jit
* Revert some changes
* Remove unused local
* Check whether a call can be spilled without side effect
* Get rid of BAD_VAR_NUM
* Add comments for CanSpillCallWithoutSideEffect
* Use ancestors to estimate whether a call can be spilled or not
* Reset m_ancestors before walking
* Nit
* Fix assertion
* Limit to GT_STORE_LCL_VAR only
* Oops
* Inline the check
* Remove leftovers
* Hoist the check
* Make sure the store parent is the statement root
Co-authored-by: Andy Ayers <[email protected]>
* Format JIT
* Check side effects before trying inlining
* Fix
* Nit
* Make lvHasLdAddrOp check optional
* Rename to early
* Split effects if necessary
* Use gtSplitTree
* Teach gtSplitTree to support early use
* Cleanup
* ClearInlineInfo is not needed
---------
Co-authored-by: Andy Ayers <[email protected]>1 parent 21ab780 commit a9d67ec
File tree
4 files changed
+102
-20
lines changed- src/coreclr/jit
4 files changed
+102
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3790 | 3790 | | |
3791 | 3791 | | |
3792 | 3792 | | |
3793 | | - | |
| 3793 | + | |
3794 | 3794 | | |
3795 | 3795 | | |
3796 | 3796 | | |
| |||
5114 | 5114 | | |
5115 | 5115 | | |
5116 | 5116 | | |
| 5117 | + | |
| 5118 | + | |
5117 | 5119 | | |
5118 | 5120 | | |
5119 | 5121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
| |||
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
222 | | - | |
| 224 | + | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
227 | 247 | | |
228 | 248 | | |
229 | 249 | | |
| |||
586 | 606 | | |
587 | 607 | | |
588 | 608 | | |
| 609 | + | |
589 | 610 | | |
590 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
591 | 662 | | |
592 | 663 | | |
593 | 664 | | |
| |||
730 | 801 | | |
731 | 802 | | |
732 | 803 | | |
733 | | - | |
734 | | - | |
735 | | - | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
736 | 807 | | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | 808 | | |
745 | 809 | | |
746 | 810 | | |
| |||
755 | 819 | | |
756 | 820 | | |
757 | 821 | | |
758 | | - | |
| 822 | + | |
759 | 823 | | |
760 | 824 | | |
761 | 825 | | |
| |||
805 | 869 | | |
806 | 870 | | |
807 | 871 | | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
808 | 879 | | |
809 | 880 | | |
810 | 881 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17005 | 17005 | | |
17006 | 17006 | | |
17007 | 17007 | | |
| 17008 | + | |
| 17009 | + | |
17008 | 17010 | | |
17009 | 17011 | | |
17010 | 17012 | | |
| |||
17025 | 17027 | | |
17026 | 17028 | | |
17027 | 17029 | | |
17028 | | - | |
17029 | | - | |
| 17030 | + | |
| 17031 | + | |
| 17032 | + | |
| 17033 | + | |
| 17034 | + | |
| 17035 | + | |
17030 | 17036 | | |
17031 | 17037 | | |
17032 | 17038 | | |
17033 | 17039 | | |
17034 | 17040 | | |
17035 | 17041 | | |
| 17042 | + | |
17036 | 17043 | | |
17037 | 17044 | | |
17038 | 17045 | | |
| |||
17049 | 17056 | | |
17050 | 17057 | | |
17051 | 17058 | | |
17052 | | - | |
| 17059 | + | |
17053 | 17060 | | |
17054 | 17061 | | |
17055 | 17062 | | |
17056 | 17063 | | |
| 17064 | + | |
17057 | 17065 | | |
17058 | 17066 | | |
17059 | 17067 | | |
| |||
17195 | 17203 | | |
17196 | 17204 | | |
17197 | 17205 | | |
17198 | | - | |
| 17206 | + | |
| 17207 | + | |
17199 | 17208 | | |
17200 | 17209 | | |
17201 | 17210 | | |
| |||
17278 | 17287 | | |
17279 | 17288 | | |
17280 | 17289 | | |
17281 | | - | |
| 17290 | + | |
17282 | 17291 | | |
17283 | 17292 | | |
17284 | 17293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
0 commit comments