要約
中間表現(IRS)は、コンパイラの設計とプログラム分析に重要な役割を果たしますが、大規模な言語モデル(LLM)による理解は依存していないままです。
この論文では、IRSの理解において、6つの最先端のLLMS:GPT-4、GPT-3、DEEPSEEK、GEMMA 2、LLAMA 3、およびCODE LLAMAの能力を評価する探索的経験的研究を紹介します。
具体的には、コントロールフローグラフの再構築、逆コンパイル、コード要約、および実行推論の4つのコアタスクでモデルのパフォーマンスを評価します。
LLMは、IR構文を解析し、高レベルの構造を特定する能力を示しますが、特に制御フローの推論、ループ処理、動的実行において、指導レベルの推論と一貫して苦労しています。
一般的な障害モードには、分岐命令の誤解、重要な操作の省略、および正確な指導レベルのロジックではなく、ヒューリスティックな推論に依存することが含まれます。
私たちの調査結果は、LLM設計におけるIR固有の強化の必要性を強調しています。
構造化されたIRデータセットの微調整と、モデルの有効性を改善するために、コントロールフロー感受性アーキテクチャを統合することをお勧めします。
すべての実験データとソースコードは公開されています
要約(オリジナル)
Intermediate Representations (IRs) play a critical role in compiler design and program analysis, yet their comprehension by Large Language Models (LLMs) remains underexplored. In this paper, we present an explorative empirical study evaluating the capabilities of six state-of-the-art LLMs: GPT-4, GPT-3, DeepSeek, Gemma 2, Llama 3, and Code Llama, in understanding IRs. Specifically, we assess model performance across four core tasks: control flow graph reconstruction, decompilation, code summarization, and execution reasoning. While LLMs exhibit competence in parsing IR syntax and identifying high-level structures, they consistently struggle with instruction-level reasoning, especially in control flow reasoning, loop handling, and dynamic execution. Common failure modes include misinterpreting branching instructions, omitting critical operations, and relying on heuristic reasoning rather than precise instruction-level logic. Our findings highlight the need for IR-specific enhancements in LLM design. We recommend fine-tuning on structured IR datasets and integrating control-flow-sensitive architectures to improve model effectiveness. All experimental data and source code are publicly available at
arxiv情報
| 著者 | Hailong Jiang,Jianfeng Zhu,Yao Wan,Bo Fang,Hongyu Zhang,Ruoming Jin,Qiang Guan |
| 発行日 | 2025-06-05 15:48:54+00:00 |
| arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google