Commit 157137a
committed
Change signature of
Currently it is called twice, once with `allow_unstable` set to true and
once with it set to false. This results in some duplicated work. Most
notably, for the LLVM backend, `LLVMRustHasFeature` is called twice for
every feature, and it's moderately slow. For very short running
compilations on platforms with many features (e.g. a `check` build of
hello-world on x86) this is a significant fraction of runtime.
This commit changes `target_features_cfg` so it is only called once, and
it now returns a pair of feature sets. This halves the number of
`LLVMRustHasFeature` calls.target_features_cfg.1 parent ee5bae8 commit 157137a
1 file changed
+6
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 179 | + | |
184 | 180 | | |
185 | | - | |
| 181 | + | |
186 | 182 | | |
187 | 183 | | |
188 | 184 | | |
| |||
196 | 192 | | |
197 | 193 | | |
198 | 194 | | |
199 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
200 | 199 | | |
201 | 200 | | |
202 | 201 | | |
| |||
0 commit comments