Commit 1b707b1
committed
Auto merge of #33171 - michaelwoerister:collector-drop-glue, r=nikomatsakis
Some preliminary work towards making trans "collector driven".
The `trans::collector` already collects all translation items and `trans::partitioning` distributes these translation items into codegen units. The changes in this PR provide the following extensions to this functionality:
1. Drop-glue is handled more accurately now, knowing about the difference between `DropGlueKind::Ty` and `DropGlueKind::TyContents`.
2. The partitioning module now supports the `FixedUnitCount` strategy which more or less corresponds to the partitioning one gets via supplying `-Ccodegen-units` today.
3. The partitioning scheme also takes care of assigned LLVM declarations to codegen units, not just definitions (declarations for external items not yet implemented).
It's debatable whether declarations should be handled by the partitioning scheme or whether they should just be emitted on demand.File tree
20 files changed
+323
-144
lines changed- src
- librustc_data_structures
- librustc_llvm
- librustc_trans
- test/codegen-units
- item-collection
- partitioning
20 files changed
+323
-144
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 55 | + | |
| 56 | + | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
| |||
284 | 283 | | |
285 | 284 | | |
286 | 285 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
291 | 290 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
296 | 307 | | |
297 | 308 | | |
298 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
2934 | 2934 | | |
2935 | 2935 | | |
2936 | 2936 | | |
2937 | | - | |
| 2937 | + | |
2938 | 2938 | | |
2939 | 2939 | | |
2940 | 2940 | | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
2941 | 2947 | | |
2942 | | - | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
2943 | 2952 | | |
2944 | 2953 | | |
2945 | 2954 | | |
| |||
2967 | 2976 | | |
2968 | 2977 | | |
2969 | 2978 | | |
2970 | | - | |
2971 | | - | |
2972 | | - | |
2973 | | - | |
2974 | | - | |
2975 | | - | |
2976 | | - | |
2977 | | - | |
2978 | | - | |
2979 | | - | |
2980 | | - | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
2981 | 2991 | | |
2982 | 2992 | | |
2983 | 2993 | | |
| |||
0 commit comments