Commit 18e1928
committed
[SelectionDAG] Split sd_use_iterator into sd_user_iterator and sd_use_iterator.
sd_use_iterator now returns an SDUse& when dereferenced.
sd_user_iterator returns SDNode*.a
SDNode::use_begin/use_end/uses work on sd_use_iterator.
SDNode::user_begin/user_end/users work on sd_user_iterator.
This allows us to write range based for loops using SDUse& and
SDNode::uses(). I've converted many of these in this patch. I
didn't update loops that have additional variables updated in their
for statement.
Some loops use sd_use_iterator::getOperandNo() which also prevents
using range based for loops. I plan to move this into SDUse in a
follow up patch.1 parent e389492 commit 18e1928
File tree
18 files changed
+248
-234
lines changed- llvm
- include/llvm/CodeGen
- lib
- CodeGen/SelectionDAG
- Target
- AArch64
- AMDGPU
- ARM
- Hexagon
- PowerPC
- RISCV
- SystemZ
- X86
18 files changed
+248
-234
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
753 | | - | |
| 753 | + | |
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| |||
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
824 | | - | |
| 824 | + | |
825 | 825 | | |
826 | | - | |
| 826 | + | |
827 | 827 | | |
828 | 828 | | |
829 | | - | |
830 | | - | |
831 | | - | |
| 829 | + | |
832 | 830 | | |
833 | 831 | | |
834 | 832 | | |
| |||
837 | 835 | | |
838 | 836 | | |
839 | 837 | | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
840 | 878 | | |
841 | 879 | | |
842 | 880 | | |
843 | 881 | | |
844 | 882 | | |
845 | 883 | | |
846 | 884 | | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
| 885 | + | |
857 | 886 | | |
858 | 887 | | |
859 | | - | |
| 888 | + | |
860 | 889 | | |
861 | 890 | | |
862 | 891 | | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
863 | 904 | | |
864 | 905 | | |
865 | 906 | | |
| |||
1019 | 1060 | | |
1020 | 1061 | | |
1021 | 1062 | | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1025 | 1066 | | |
1026 | 1067 | | |
1027 | 1068 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13229 | 13229 | | |
13230 | 13230 | | |
13231 | 13231 | | |
13232 | | - | |
13233 | | - | |
13234 | | - | |
| 13232 | + | |
| 13233 | + | |
13235 | 13234 | | |
13236 | 13235 | | |
13237 | | - | |
| 13236 | + | |
13238 | 13237 | | |
13239 | 13238 | | |
13240 | 13239 | | |
| |||
13266 | 13265 | | |
13267 | 13266 | | |
13268 | 13267 | | |
13269 | | - | |
13270 | | - | |
13271 | | - | |
| 13268 | + | |
13272 | 13269 | | |
13273 | 13270 | | |
13274 | 13271 | | |
| |||
13780 | 13777 | | |
13781 | 13778 | | |
13782 | 13779 | | |
13783 | | - | |
13784 | | - | |
| 13780 | + | |
13785 | 13781 | | |
13786 | | - | |
13787 | | - | |
| 13782 | + | |
| 13783 | + | |
13788 | 13784 | | |
13789 | 13785 | | |
13790 | 13786 | | |
| |||
18928 | 18924 | | |
18929 | 18925 | | |
18930 | 18926 | | |
18931 | | - | |
| 18927 | + | |
18932 | 18928 | | |
18933 | 18929 | | |
18934 | 18930 | | |
| |||
20056 | 20052 | | |
20057 | 20053 | | |
20058 | 20054 | | |
20059 | | - | |
20060 | | - | |
| 20055 | + | |
20061 | 20056 | | |
20062 | | - | |
| 20057 | + | |
20063 | 20058 | | |
20064 | 20059 | | |
20065 | | - | |
| 20060 | + | |
20066 | 20061 | | |
20067 | 20062 | | |
20068 | 20063 | | |
| |||
20940 | 20935 | | |
20941 | 20936 | | |
20942 | 20937 | | |
20943 | | - | |
| 20938 | + | |
20944 | 20939 | | |
20945 | 20940 | | |
20946 | 20941 | | |
| |||
20958 | 20953 | | |
20959 | 20954 | | |
20960 | 20955 | | |
20961 | | - | |
20962 | | - | |
| 20956 | + | |
| 20957 | + | |
| 20958 | + | |
20963 | 20959 | | |
20964 | 20960 | | |
20965 | 20961 | | |
20966 | | - | |
| 20962 | + | |
20967 | 20963 | | |
20968 | 20964 | | |
20969 | 20965 | | |
| |||
27320 | 27316 | | |
27321 | 27317 | | |
27322 | 27318 | | |
27323 | | - | |
27324 | | - | |
| 27319 | + | |
27325 | 27320 | | |
27326 | 27321 | | |
27327 | 27322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11611 | 11611 | | |
11612 | 11612 | | |
11613 | 11613 | | |
11614 | | - | |
| 11614 | + | |
11615 | 11615 | | |
11616 | 11616 | | |
11617 | 11617 | | |
| |||
11650 | 11650 | | |
11651 | 11651 | | |
11652 | 11652 | | |
11653 | | - | |
| 11653 | + | |
11654 | 11654 | | |
11655 | 11655 | | |
11656 | 11656 | | |
| |||
11660 | 11660 | | |
11661 | 11661 | | |
11662 | 11662 | | |
11663 | | - | |
| 11663 | + | |
11664 | 11664 | | |
11665 | 11665 | | |
11666 | 11666 | | |
11667 | 11667 | | |
11668 | | - | |
| 11668 | + | |
11669 | 11669 | | |
11670 | 11670 | | |
11671 | 11671 | | |
| |||
11708 | 11708 | | |
11709 | 11709 | | |
11710 | 11710 | | |
11711 | | - | |
| 11711 | + | |
11712 | 11712 | | |
11713 | 11713 | | |
11714 | 11714 | | |
| |||
11718 | 11718 | | |
11719 | 11719 | | |
11720 | 11720 | | |
11721 | | - | |
| 11721 | + | |
11722 | 11722 | | |
11723 | 11723 | | |
11724 | 11724 | | |
11725 | 11725 | | |
11726 | | - | |
| 11726 | + | |
11727 | 11727 | | |
11728 | 11728 | | |
11729 | 11729 | | |
| |||
11756 | 11756 | | |
11757 | 11757 | | |
11758 | 11758 | | |
11759 | | - | |
| 11759 | + | |
11760 | 11760 | | |
11761 | 11761 | | |
11762 | 11762 | | |
| |||
11767 | 11767 | | |
11768 | 11768 | | |
11769 | 11769 | | |
11770 | | - | |
| 11770 | + | |
11771 | 11771 | | |
11772 | 11772 | | |
11773 | 11773 | | |
11774 | 11774 | | |
11775 | | - | |
| 11775 | + | |
11776 | 11776 | | |
11777 | 11777 | | |
11778 | 11778 | | |
| |||
11810 | 11810 | | |
11811 | 11811 | | |
11812 | 11812 | | |
11813 | | - | |
| 11813 | + | |
11814 | 11814 | | |
11815 | 11815 | | |
11816 | 11816 | | |
11817 | 11817 | | |
11818 | 11818 | | |
11819 | 11819 | | |
11820 | 11820 | | |
11821 | | - | |
| 11821 | + | |
11822 | 11822 | | |
11823 | 11823 | | |
11824 | 11824 | | |
| |||
11837 | 11837 | | |
11838 | 11838 | | |
11839 | 11839 | | |
11840 | | - | |
| 11840 | + | |
11841 | 11841 | | |
11842 | 11842 | | |
11843 | 11843 | | |
| |||
11982 | 11982 | | |
11983 | 11983 | | |
11984 | 11984 | | |
11985 | | - | |
11986 | | - | |
11987 | | - | |
| 11985 | + | |
11988 | 11986 | | |
11989 | | - | |
| 11987 | + | |
11990 | 11988 | | |
11991 | 11989 | | |
11992 | 11990 | | |
| |||
12462 | 12460 | | |
12463 | 12461 | | |
12464 | 12462 | | |
12465 | | - | |
12466 | | - | |
| 12463 | + | |
| 12464 | + | |
12467 | 12465 | | |
12468 | 12466 | | |
12469 | 12467 | | |
| |||
12479 | 12477 | | |
12480 | 12478 | | |
12481 | 12479 | | |
12482 | | - | |
12483 | | - | |
| 12480 | + | |
| 12481 | + | |
12484 | 12482 | | |
12485 | 12483 | | |
12486 | 12484 | | |
| |||
0 commit comments