Commit cf954ec
Always RefineType on the success branch of a CondBranchCheckType
Summary:
The JIT currently has a strange setup where sometimes it'll emit `RefineType`
instructions after a `CondBranchCheckType` in the HIR builder and other times
it'll skip doing so but then it can materialize them in
`removeUnreachableInstructions()`.
The builder should always emit them, to be consistent. This gets rid of the
register uses map and dominator tree usage in `removeUnreachableInstructions()`
which is a nice cleanup.
Technically this diff removes the failure branch `RefineType` that
`removeUnreachableInstructions()` can add. That's an intentional sacrifice.
The types in the failure branch are as precise as `TTop - TTuple` or `TTop -
TType`; they're not useful for optimizations. If we really want this to work
well, we'll want `reflowTypes()` to do a better job typing all codepaths through
a CFG instead of doing this in unreachable code deletion.
Reviewed By: DinoV
Differential Revision: D115009155
fbshipit-source-id: f85d003e01bde3998d7a5d893ed250e7915ff0f21 parent f611695 commit cf954ec
7 files changed
Lines changed: 900 additions & 928 deletions
File tree
- cinderx
- Jit/hir
- RuntimeTests/hir_tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2226 | 2226 | | |
2227 | 2227 | | |
2228 | 2228 | | |
2229 | | - | |
| 2229 | + | |
2230 | 2230 | | |
2231 | 2231 | | |
2232 | 2232 | | |
| |||
3410 | 3410 | | |
3411 | 3411 | | |
3412 | 3412 | | |
3413 | | - | |
3414 | 3413 | | |
3415 | 3414 | | |
3416 | 3415 | | |
| |||
4031 | 4030 | | |
4032 | 4031 | | |
4033 | 4032 | | |
4034 | | - | |
| 4033 | + | |
4035 | 4034 | | |
4036 | 4035 | | |
4037 | 4036 | | |
| |||
4142 | 4141 | | |
4143 | 4142 | | |
4144 | 4143 | | |
| 4144 | + | |
4145 | 4145 | | |
| 4146 | + | |
4146 | 4147 | | |
4147 | 4148 | | |
4148 | | - | |
| 4149 | + | |
4149 | 4150 | | |
4150 | 4151 | | |
4151 | 4152 | | |
| 4153 | + | |
| 4154 | + | |
4152 | 4155 | | |
4153 | | - | |
| 4156 | + | |
4154 | 4157 | | |
4155 | 4158 | | |
4156 | 4159 | | |
4157 | 4160 | | |
| 4161 | + | |
4158 | 4162 | | |
4159 | 4163 | | |
4160 | 4164 | | |
4161 | | - | |
| 4165 | + | |
| 4166 | + | |
4162 | 4167 | | |
4163 | 4168 | | |
4164 | 4169 | | |
| |||
4171 | 4176 | | |
4172 | 4177 | | |
4173 | 4178 | | |
4174 | | - | |
| 4179 | + | |
| 4180 | + | |
4175 | 4181 | | |
4176 | 4182 | | |
4177 | 4183 | | |
| |||
4601 | 4607 | | |
4602 | 4608 | | |
4603 | 4609 | | |
| 4610 | + | |
| 4611 | + | |
| 4612 | + | |
| 4613 | + | |
| 4614 | + | |
4604 | 4615 | | |
4605 | | - | |
4606 | | - | |
4607 | | - | |
4608 | | - | |
| 4616 | + | |
4609 | 4617 | | |
4610 | 4618 | | |
4611 | | - | |
4612 | | - | |
4613 | | - | |
4614 | | - | |
| 4619 | + | |
4615 | 4620 | | |
4616 | 4621 | | |
| 4622 | + | |
| 4623 | + | |
4617 | 4624 | | |
4618 | | - | |
| 4625 | + | |
4619 | 4626 | | |
4620 | 4627 | | |
4621 | 4628 | | |
| |||
4714 | 4721 | | |
4715 | 4722 | | |
4716 | 4723 | | |
4717 | | - | |
| 4724 | + | |
| 4725 | + | |
4718 | 4726 | | |
4719 | 4727 | | |
4720 | 4728 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | 837 | | |
847 | 838 | | |
848 | 839 | | |
| |||
891 | 882 | | |
892 | 883 | | |
893 | 884 | | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | 885 | | |
902 | 886 | | |
903 | 887 | | |
| |||
906 | 890 | | |
907 | 891 | | |
908 | 892 | | |
909 | | - | |
910 | 893 | | |
911 | 894 | | |
912 | 895 | | |
| |||
932 | 915 | | |
933 | 916 | | |
934 | 917 | | |
935 | | - | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | 918 | | |
964 | 919 | | |
965 | 920 | | |
966 | 921 | | |
967 | | - | |
968 | 922 | | |
969 | 923 | | |
970 | 924 | | |
| |||
0 commit comments