{"id":993,"date":"2026-01-29T18:41:38","date_gmt":"2026-01-29T17:41:38","guid":{"rendered":"https:\/\/metrics.blogg.gu.se\/?p=993"},"modified":"2026-01-22T18:45:00","modified_gmt":"2026-01-22T17:45:00","slug":"what-happens-if-you-give-a-compiler-to-an-llm","status":"publish","type":"post","link":"https:\/\/metrics.blogg.gu.se\/?p=993","title":{"rendered":"What happens if you give a compiler to an LLM&#8230;"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/metrics.blogg.gu.se\/files\/2026\/01\/LLM-approaches_-alone-vs-with-feedback.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/metrics.blogg.gu.se\/files\/2026\/01\/LLM-approaches_-alone-vs-with-feedback-1024x683.png\" alt=\"\" class=\"wp-image-994\" srcset=\"https:\/\/metrics.blogg.gu.se\/files\/2026\/01\/LLM-approaches_-alone-vs-with-feedback-1024x683.png 1024w, https:\/\/metrics.blogg.gu.se\/files\/2026\/01\/LLM-approaches_-alone-vs-with-feedback-300x200.png 300w, https:\/\/metrics.blogg.gu.se\/files\/2026\/01\/LLM-approaches_-alone-vs-with-feedback-768x512.png 768w, https:\/\/metrics.blogg.gu.se\/files\/2026\/01\/LLM-approaches_-alone-vs-with-feedback-1200x800.png 1200w, https:\/\/metrics.blogg.gu.se\/files\/2026\/01\/LLM-approaches_-alone-vs-with-feedback-1320x880.png 1320w, https:\/\/metrics.blogg.gu.se\/files\/2026\/01\/LLM-approaches_-alone-vs-with-feedback.png 1536w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/figure>\n\n\n\n<p><a href=\"https:\/\/www.arxiv.org\/abs\/2601.12146\">https:\/\/www.arxiv.org\/abs\/2601.12146<\/a><\/p>\n\n\n\n<p>Large Language Models (LLMs) are now central to code generation, but they often produce <strong>non-compiling or incorrect programs<\/strong>. We investigate how giving an LLM direct access to a <strong>real compiler (gcc)<\/strong> transforms it from a passive code writer into an <em>active programming agent<\/em>.<\/p>\n\n\n\n<p>We conduct an extensive experiment on <strong>699 real programming tasks in C<\/strong>, using models from 135 M to 70 B parameters. With compiler feedback integrated into the generation loop, the LLMs dramatically improve: <strong>compilation success jumps by 5.3 \u2013 79.4 percentage points<\/strong>, syntax errors drop ~75 %, and undefined references drop ~87 %.<\/p>\n\n\n\n<p>Interestingly, <strong>smaller LLMs with compiler feedback can outperform larger models<\/strong> without this access, suggesting that tools like compilers can <em>compensate<\/em> for model size and reduce energy\/compute costs in software applications.<\/p>\n\n\n\n<p>Overall, the study highlights the role <strong>software engineering tools play in practical LLM deployment<\/strong>, pushing us toward more interactive, feedback-driven code agents rather than one-shot generators. It\u2019s a promising step toward combining NLP models with existing development ecosystems for better accuracy and efficiency.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/www.arxiv.org\/abs\/2601.12146 Large Language Models (LLMs) are now central to code generation, but they often produce non-compiling or incorrect programs. We investigate how giving an LLM direct access to a real compiler (gcc) transforms it from a passive code writer into an active programming agent. We conduct an extensive experiment on 699 real programming tasks in &hellip; <a href=\"https:\/\/metrics.blogg.gu.se\/?p=993\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;What happens if you give a compiler to an LLM&#8230;&#8221;<\/span><\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/posts\/993"}],"collection":[{"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=993"}],"version-history":[{"count":1,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/posts\/993\/revisions"}],"predecessor-version":[{"id":995,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/posts\/993\/revisions\/995"}],"wp:attachment":[{"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}