Skip to content

Implement data-based compiler perturbance #136

@MattWindsor91

Description

@MattWindsor91

An idea I had while thinking about #135 is to move the compiler optimisation/moptimisation functionality into a data-driven perturber pass separate from c4t's compiler interface. Something like a YAML table of the form:

- name: "std-opts"
  precondition:
  # Might need a proper boolean language for this, possibly even SQL.
  - compiler: "gcc.*"
  opts:
  - name: "0"
    bias: "size"
    # etc

- name: "outline-atomics"
  precondition:
  - compiler: "gcc.gcc"
    min-version: "10"
    arch: "aarch64.8"
  - compiler: "gcc.clang"
    min-version: "12"
    arch: "aarch64.8"
  flags:
  - name: "outline-atomics"
    allow-empty: true
    choices: ["moutline-atomics", "mno-outline-atomics"]

This table would either be embedded into c4t-perturb or just read from config, with an example given as part of c4t's distribution. It'd be read in by the perturber, with the other parts of c4t not bothering with it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions