In materials calculations, there are many recurring core kernels such as neighbor lists, sparse operations, stencil updates, and tensor contractions. If an agent generates multiple implementation variants for these parts and filters them by execution time and accuracy constraints, it may replace or assist part of manual optimization.
In the beginning, it is better to start with a small function unit rather than trying to replace an entire package. For example, extracting one slow core loop and comparing multiple implementations together with LLVM/compiler feedback can quickly determine the potential for automatic tuning suited to materials code.