Commit 388d612
authored
Rollup merge of rust-lang#139644 - yotamofek:pr/mir_transform/instsimplify/simplify_primitive_clone, r=compiler-errors
Micro-optimize `InstSimplify`'s `simplify_primitive_clone`
r? ````@compiler-errors```` , since you already did rust-lang#139411 and got randomly selected for rust-lang#139638 (feel free to reassign!)
Another one similar in spirit to rust-lang#139411, but this time for `simplify_primitive_clone`, which is doing a bit of redundant work. Might not show up in benches, but probably worth micro-optimizing since the transformation is run even for debug builds.
See inline comments for my reasoning for making these changes.1 file changed
+8
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
214 | 213 | | |
215 | 214 | | |
216 | 215 | | |
217 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
225 | | - | |
226 | | - | |
227 | 226 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 227 | + | |
234 | 228 | | |
235 | 229 | | |
236 | 230 | | |
237 | 231 | | |
238 | 232 | | |
239 | 233 | | |
240 | 234 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
246 | 238 | | |
247 | 239 | | |
248 | 240 | | |
249 | | - | |
250 | 241 | | |
251 | 242 | | |
252 | 243 | | |
| |||
258 | 249 | | |
259 | 250 | | |
260 | 251 | | |
261 | | - | |
| 252 | + | |
262 | 253 | | |
263 | 254 | | |
264 | 255 | | |
| |||
0 commit comments