{"type":"ScholarlyArticle","title":"POLO: An LLM-Powered Project-Level Code Performance Optimization Framework","authors":[{"name":"Jiameng Bai","slug":"jiameng-bai","given":"Jiameng","family":"Bai","affiliation":""},{"name":"Ruoyi Xu","slug":"ruoyi-xu","given":"Ruoyi","family":"Xu","affiliation":""},{"name":"Sai Wu","slug":"sai-wu","given":"Sai","family":"Wu","affiliation":""},{"name":"Dingyu Yang","slug":"dingyu-yang","given":"Dingyu","family":"Yang","affiliation":""},{"name":"Junbo Zhao","slug":"junbo-zhao","given":"Junbo","family":"Zhao","affiliation":""},{"name":"Gang Chen","slug":"gang-chen","given":"Gang","family":"Chen","affiliation":""}],"abstract":"Program performance optimization is essential for achieving high execution efficiency, yet it remains a challenging task that requires expertise in both software and hardware.\r\nLarge Language Models (LLMs), trained on high-quality code from platforms like GitHub and other open-source sources, have shown promise in generating optimized code for simple snippets. However, current LLM-based solutions often fall short when tackling project-level programs due to the complexity of call graphs and the intricate interactions among functions. In this paper, we emulate the process a human expert might follow when optimizing project-level programs and introduce a three-phase framework POLO (PrOject-Level Optimizer) to address this limitation. \r\nFirst, we profile the program to identify performance bottlenecks using an iterative weighting algorithm. \r\nNext, we conduct structural analysis by scanning the project and generating a graph that represents the program's structure. \r\nFinally, two LLM agents collaborate in iterative cycles to rewrite and optimize the code at these hotspots, gradually improving performance. \r\nWe conduct experiments on open-source and proprietary projects. The results demonstrate that POLO accurately identifies performance bottlenecks and successfully applies optimizations. Under the O3 compilation flag, the optimized programs achieved speedups ranging from 1.34x to 21.5x.","doi":"10.24963/ijcai.2025/814","url":"https://ijcai.org/proceedings/2025/814","pdf":"https://ijcai.org/proceedings/2025/0814.pdf","markdown":"https://ijcai.org/proceedings/2025/814.md","bibtex":"https://ijcai.org/proceedings/2025/bibtex/814","volume":{"slug":"2025","title":"Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence","short_title":"IJCAI 2025","url":"https://ijcai.org/proceedings/2025/","year":2025,"location":"Montreal, Canada","dates":"16-22 August 2025","editors":"James Kwok","isbn":"978-1-956792-06-5","publisher":"International Joint Conferences on Artificial Intelligence Organization","doi_prefix":"10.24963/ijcai.2025"},"section":"Multidisciplinary Topics and Applications","track":"Main Track","number":814,"pages":{"first":7319,"last":7328},"keywords":["Multidisciplinary Topics and Applications: MTA: Software engineering","Agent-based and Multi-agent Systems: MAS: Engineering methods, platforms, languages and tools"],"videos":[],"references":[],"license_note":"Copyright International Joint Conferences on Artificial Intelligence."}