So I think the dead code in 3/7 is fine, even for upstream, because it's simple and clear what it's used for. hlsl_index_is_crooked_matrix_indexing(), on the other hand, isn't used in this patch (anymore), and is less clear, so I'd be inclined to defer it until it's used.
Okay.
Wrt naming, perhaps invert the meaning and say "contiguous" rather than "crooked"? (And "matrix_indexing" is probably redundant.)
I changed the name to "hlsl_index_is_noncontiguous". I think it is better not to invert the naming (and the return value) because this is a rather exceptional case, and it is often the one that deserves special treatment.
Also, in part 2 of the series, I want to discuss a patch for also using `hlsl_ir_index` for resource accesses, which introduces a similar function, for which the inverted naming would be inappropriate: ```c bool hlsl_index_is_resource_access(struct hlsl_ir_index *index); ```