LLMs can effectively propose semantic-preserving code optimizations that compilers overlook, but their suggestions need validation and evaluation to be production-ready—they work best as a complementary tool rather than a replacement for traditional optimization.
This paper investigates whether large language models can identify code optimization opportunities that traditional compilers miss by recovering hidden semantic information from C/C++ code.