Brussels / 3 & 4 February 2024


HPC-oriented Large-scale Code Restructurings with Coccinelle

Once a codebase gets large, refactoring for performance is difficult. Challenges include: the sheer time to carry out a possibly complicated transformation globally; the risk of introducing defects; poor acceptance by collaborators or code owners (if doing the HPC-oriented update for others); coping with diverging 'performance' paradigms (different parallelism models, APIs for GPU, etc). The Coccinelle code transformation system can express a vast range of refactorings for C/C++ codebases as so-called 'semantic patches', that is programs in a special 'transformation' language. While 'semantic patches' are typically very short, they can radically transform arbitrarily large codebases, thus coping with the above mentioned 'challenges'. This talk introduces the usage concept and shows sound, self-contained examples of HPC-oriented refactorings, including latest and upcoming features.


Michele Martone
Julia Lawall