Software optimisation is necessary in order to achieve good performance from various science and engineering software applications. This has recently become increasingly important because the long-standing trend for rapid advances in raw processor speed has come to an end. Future high-performance computers will be characterised by diversity and multi-core parallelism, meaning chips that contain in one package multiple processors. Getting software to make effective use of such architectures will require increasingly sophisticated optimisation techniques. This proposal seeks to address a specific problem in optimising high-performance software: Given N pieces of code (components) and M possible optimisations that might be applicable, can we manage the resulting optimisation decisions in a smarter way than equipping every one of the N components with information (metadata) that determines whether each of the M optimisations can be applied and how much it is likely to gain. This is important because it is only if we can "unweave" this cross-product of components and optimisations that we can hope to optimise effectively. The challenge is to make it possible to add new components without having to re-write our existing optimisations, and to add new optimisations without having to add to the metadata for all exsiting components.