Review on existing open-source Register Allocation algorithms with GCC\LLVM
来源:互联网 发布:testflight是什么软件 编辑:程序博客网 时间:2024/06/10 14:26
The essence of compiler is in back-end, precisely, it is optimization. And Register Allocation is one very important aspect of compiler optimization.
This article contains a simple review on existing open sourced Register Allocation algorithms, with GCC and LLVM.
1. Traditional, general Register Allocation algorithm - Graph Coloring
In input language, there exists an invisible reference\dependent graph among registers and instructions. To avoid conflictions, different vars should reside in different registers. Essentially it is a graph coloring algorithm, which is a NP-hard problem. This is not the focus of this review. Please refer to http://www.cs.cmu.edu/~dkoes/research/graphraTR.pdf
2. GCC vs. LLVM
GCC buys the graph coloring algorithm, but it seems not easy to do this job: http://gcc.gnu.org/wiki/RegisterAllocation. But LLVM decides to adopt simpler but more efficient methods to implement RA problem: linear scanning + spiller strategy, and it says it works very well, with 1-2% smaller memory occupation and up to 10% faster code execution. And in LLVM, Greedy RA algorithm is defaulted, which is based on the linear scanning strategy, in which reg life intervals are basic tools to operate.
In perspective of engineering, it is LLVM that is a better choice indeed - simpler, more capable. http://blog.llvm.org/2011/09/greedy-register-allocation-in-llvm-30.html
- Review on existing open-source Register Allocation algorithms with GCC\LLVM
- Open Source GCC
- The Architecture of Open Source Applications -- llvm
- Open Source on Github
- open source ids with python
- 【笔记】A Review on Multi-Label Learning Algorithms
- A Review on Multi-Label Learning Algorithms - KNN
- UVA 5864 - Register Allocation
- UVALive 5864 - Register Allocation
- comments on open source groupware projects
- comments on several open source groupware
- java php rails on ruby open source
- Open Source on Github: Your First Contribution
- Open Source on Github: Your First Contribution
- A Primer on Open-Source NoSQL Databases
- Building consumer products with open source
- Fulfill Your Ambitions with Open Source
- Building Open Source libraries with Android NDK
- Linux内核驱动(四):1、进程地址空间
- POJ 1001 求高精度幂【JAVA】
- 如何用DOS命令,获取一个目录下的文件数目
- !!!博弈论基础: 巴什博奕+威佐夫博奕+尼姆博弈
- VC2010横空出世 C++0x初露锋芒
- Review on existing open-source Register Allocation algorithms with GCC\LLVM
- Longest Substring Without Repeating Characters
- 给你的shell一点颜色看看
- 重构之重与敏捷之轻---身份证号重构回顾
- jQuery Note
- 对多个tomcat部署同一个应用的认识
- IOS开发(59)之Block Object的调用
- Apriori算法
- objective-c继承