cranelift_codegen_meta::shared

Function verify_instruction_formats

source
fn verify_instruction_formats(
    all_instructions: &Vec<Rc<InstructionContent>>,
) -> Vec<Rc<InstructionFormat>>
Expand description

Verifies certain properties of formats.

  • Formats must be uniquely named: if two formats have the same name, they must refer to the same data. Otherwise, two format variants in the codegen crate would have the same name.
  • Formats must be structurally different from each other. Otherwise, this would lead to code duplicate in the codegen crate.

Returns a list of all the instruction formats effectively used.