Commit f1bc713
Create FunctionCloningThreshold flag to limit the number of times functions can be cloned.
Functions are cloned for each function group they belong to. This can cause a function to be compiled N times for N function groups that all call this function.
When N is large, this will greatly increase the compile time and memory usage.
This flag limits the number of times a function can be cloned, such that if it's exceeded, we convert it to an indirectly called function.
It will only be compiled once, and runtime relocation is used to patch the function address to each function group which it belongs to.
The default value is 0, which means there is no limit.1 parent beaea61 commit f1bc713
File tree
4 files changed
+51
-23
lines changed- IGC
- AdaptorCommon
- Compiler/CISACodeGen
- common
4 files changed
+51
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
885 | 885 | | |
886 | 886 | | |
887 | 887 | | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
909 | 892 | | |
910 | 893 | | |
911 | 894 | | |
| |||
925 | 908 | | |
926 | 909 | | |
927 | 910 | | |
928 | | - | |
| 911 | + | |
929 | 912 | | |
930 | 913 | | |
931 | 914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
152 | 171 | | |
153 | 172 | | |
154 | 173 | | |
| |||
209 | 228 | | |
210 | 229 | | |
211 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
212 | 250 | | |
213 | 251 | | |
214 | 252 | | |
| |||
602 | 640 | | |
603 | 641 | | |
604 | 642 | | |
605 | | - | |
606 | 643 | | |
607 | 644 | | |
608 | 645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
244 | 248 | | |
245 | 249 | | |
246 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
363 | 367 | | |
364 | 368 | | |
365 | 369 | | |
| |||
0 commit comments