Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Commit b835301

Browse files
committed
Forgot to mark CompositeInsert as pure & additional line cleaning
1 parent fc78eb0 commit b835301

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

crates/rustc_codegen_spirv/src/linker/dce.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ fn instruction_is_pure(inst: &Instruction) -> bool {
162162
| InBoundsPtrAccessChain
163163
| CompositeConstruct
164164
| CompositeExtract
165+
| CompositeInsert
165166
| CopyObject
166167
| Transpose
167168
| ConvertFToU

crates/rustc_codegen_spirv/src/linker/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,11 @@ pub fn link(sess: &Session, mut inputs: Vec<Module>, opts: &Options) -> Result<L
295295
dce::dce(output);
296296
}
297297

298+
{
299+
let _timer = sess.timer("link_remove_duplicate_lines_2");
300+
duplicates::remove_duplicate_lines(output);
301+
}
302+
298303
if opts.compact_ids {
299304
let _timer = sess.timer("link_compact_ids");
300305
// compact the ids https://github.com/KhronosGroup/SPIRV-Tools/blob/e02f178a716b0c3c803ce31b9df4088596537872/source/opt/compact_ids_pass.cpp#L43

0 commit comments

Comments
 (0)