4 research outputs found
LLVM λ΄μ Early CSE λ₯Ό μν κ²μ¦λκ³ μ λ’°ν μ μλ μ»΄νμΌλ¬ νλ μμν¬
νμλ
Όλ¬Έ (μμ¬)-- μμΈλνκ΅ λνμ : 곡과λν μ»΄ν¨ν°κ³΅νλΆ, 2018. 8. νμΆ©κΈΈ.Compiler verification is important when obtaining a high level of reliability through software verification. Compiler bugs are crucial for software verification because code that running programs are not source code but execution code. However, many C/C++ mainstream compilers, including GCC and LLVM focus on efficiency rather than reliability. Although testing is an effective method to identify bugs, it does not guarantee a high level of reliability. Various approaches have been proposed to examine compiler internal logics, but as yet none have been very successful.
CRELLVM is a compiler framework that validates optimization passes in LLVM to ensure high reliability of LLVM optimizations. It is able to validate major optimizations of LLVM such as Register Promotion and Global Value Numbering.
This thesis shows validation of Early CSE optimization in LLVM, using CRELLVM. For the validation, proof generation code which corresponds to Early CSE in LLVM is implemented and the proof checker has been extended. Early CSE is one of the basic optimizations in LLVM that removes the repeated computations by erasing duplicated instructions.
Based on 5.40 million lines of C code benchmarks, the experiment result shows there is no mis-compilation for Early CSE, which guarantees a high level of reliability of Early CSE in the benchmarks.Chapter 1 Introduction 1
1.1 CRELLVM Framework . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Proof Checker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Early CSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Chapter 2 Early CSE 5
2.1 Early CSE translation example . . . . . . . . . . . . . . . . . . . 5
2.2 Early CSE optimization . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Block Traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 3 Proof Generation and Validation for Early CSE 12
3.1 ERHL Proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2 Proof Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 Proof Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Chapter 4 Results 21
4.1 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2 Validation Result . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.3 Performance Result . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Chapter 5 Related Works 26
Chapter 6 Conclusion 28
μμ½ 34Maste