Ensure that static initializers are acyclic for NVPTX NVPTX does not support cycles in static initializers (see rust-lang/rust#146787). LLVM produces an error when attempting to generate code for such constructs, like self-referential structs. To avoid LLVM UB, we emit a post-monomorphization error on the Rust side before reaching codegen. This is achieved by analyzing a subgraph of the "mono item graph" that only contains statics. 1. Calculate the strongly connected components (SCCs) of the graph. 2. Check for cycles (more than one node in an SCC or one node that references itself). |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| messages.ftl | ||