MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / inline_fn

Method inline_fn

crates/rustc_codegen_spirv/src/linker/inline.rs:540–550  ·  view source on GitHub ↗
(&mut self, function: &mut Function)

Source from the content-addressed store, hash-verified

538 }
539
540 fn inline_fn(&mut self, function: &mut Function) {
541 let mut block_idx = 0;
542 while block_idx < function.blocks.len() {
543 // If we successfully inlined a block, then repeat processing on the same block, in
544 // case the newly inlined block has more inlined calls.
545 // TODO: This is quadratic
546 if !self.inline_block(function, block_idx) {
547 block_idx += 1;
548 }
549 }
550 }
551
552 fn inline_block(&mut self, caller: &mut Function, block_idx: usize) -> bool {
553 // Find the first inlined OpFunctionCall

Callers 1

inlineFunction · 0.80

Calls 1

inline_blockMethod · 0.80

Tested by

no test coverage detected