LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation

About this paper

This paper is under a licence that does not allow it to be reproduced, so what is here is its front matter and a short abstract. Read it at the publisher's page.

English
Tiếng Việt

LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation

Chris Lattner

Vikram Adve University of Illinois at Urbana-Champaign {lattner,vadve}@cs.uiuc.edu http://llvm.cs.uiuc.edu/

ABSTRACT

This paper describes LLVM (Low Level Virtual Machine), a compiler framework designed to support transparent, lifelong program analysis and transformation for arbitrary programs, by providing high-level information to compiler transformations at compile-time, link-time, run-time, and in idle time between runs. LLVM defines a common, low-level code representation in Static Single Assignment (SSA) form, with several novel features: a simple, language-independent type-system that exposes the primitives commonly used to implement high-level language features; an instruction for typed address arithmetic; and a simple mechanism that can be used to implement the exception handling features of high-level languages (and setjmp/longjmp in C) uniformly and efficiently. The LLVM compiler framework and code representation together provide a combination of key capabilities that are important for practical, lifelong analysis and transformation of programs. To our knowledge, no existing compilation approach provides all these capabilities. We describe the design of the LLVM representation and compiler framework, and evaluate the design in three ways: (a) the size and effectiveness of the representation, including the type information it provides; (b) compiler performance for several interprocedural problems; and (c) illustrative examples of the benefits LLVM provides for several challenging compiler problems.

LLVM: Một Khung Biên dịch cho Phân tích & Chuyển đổi Chương trình Suốt vòng đời

Chris Lattner

Vikram Adve University of Illinois at Urbana-Champaign {lattner,vadve}@cs.uiuc.edu http://llvm.cs.uiuc.edu/

TÓM TẮT Bài báo này mô tả LLVM (Low Level Virtual Machine), một khung trình biên dịch được thiết kế để hỗ trợ phân tích và chuyển đổi chương trình minh bạch, suốt vòng đời cho các chương trình tùy ý, bằng cách cung cấp thông tin cấp cao cho các phép biến đổi của trình biên dịch tại thời điểm biên dịch, thời điểm liên kết, thời gian chạy, và trong thời gian nhàn rỗi giữa các lần chạy. LLVM định nghĩa một biểu diễn mã chung, cấp thấp ở dạng Static Single Assignment (SSA), với một số tính năng mới: một hệ thống kiểu đơn giản, độc lập với ngôn ngữ, làm lộ ra các nguyên thủy thường được sử dụng để triển khai các tính năng ngôn ngữ cấp cao; một lệnh cho phép tính toán địa chỉ có kiểu; và một cơ chế đơn giản có thể được sử dụng để triển khai các tính năng xử lý ngoại lệ của các ngôn ngữ cấp cao (và setjmp/longjmp trong C) một cách thống nhất và hiệu quả. Khung trình biên dịch LLVM và biểu diễn mã cùng nhau cung cấp một tổ hợp các khả năng then chốt quan trọng cho việc phân tích và chuyển đổi chương trình thực tế, suốt vòng đời. Theo hiểu biết của chúng tôi, không có phương pháp biên dịch hiện có nào cung cấp tất cả các khả năng này. Chúng tôi mô tả thiết kế của biểu diễn LLVM và khung trình biên dịch, đồng thời đánh giá thiết kế theo ba cách: (a) kích thước và hiệu quả của biểu diễn, bao gồm thông tin kiểu mà nó cung cấp; (b) hiệu năng trình biên dịch cho một số bài toán liên thủ tục; và (c) các ví dụ minh họa về lợi ích mà LLVM cung cấp cho một số bài toán trình biên dịch đầy thách thức.

1 INTRODUCTION

This section is missing here.

2 PROGRAM REPRESENTATION

This section is missing here.

3 COMPILER ARCHITECTURE

This section is missing here.

4 APPLICATIONS AND EXPERIENCES

This section is missing here.

5 RELATED WORK

This section is missing here.

6 CONCLUSION

This section is missing here.

Read off the page by a vision model reading the page images using olmOCR-2-7B-1025-FP8.

Read off the page by a vision model reading the page images using olmOCR-2-7B-1025-FP8. Translated into Tiếng Việt by gpt-5, against glossary version 7. Translated from the English.