当前位置:网站首页>DCC888 :Register Allocation
DCC888 :Register Allocation
2022-06-27 22:32:00 【Spring river flower moon night morning】
Register Allocation
Register Allocation
(0)These values might be stored either in registers, or in memory.
(1)Registers are fast, but they come in small quantity.
(2)Memory is plenty, but it has slower access time.
(3) A good register allocator should strive to keep in registers the variables used more often.

the three aspects of register allocation
register assignment
The task of determining in which register each variable will be kept
spill
If a variable must be mapped into memory, we call it a spill.
Spilling is the task of determining which variables must be mapped to memory.
coalescing
If we can assign the same register to two variables related by a move instruction, then we can eliminate this move. This optimization is called coalescing.

register constraints


maxLive :MaxLive is the maximum number of registers that are simultaneously alive at any program point of the program’s control flow graph.
MinReg :The minimum number of registers that a program needs,
MinReg > MaxLive

@ = e, c Of this node input yes c -> r1,e-> r2;
c = d, Of this node input yes d->r1, e->r2;
e = a, Of this node input yes d->r1, a->r2; At this point, the discovery and the initial assumption a->r1 Conflict .
Register Assignment is NP-Complete

Chaitin’s proof

the interference graph



Linear Scan
It is based on the greedy coloring of interval graphs:
– Given a sequence of intervals, we want to find the minimum number of colors necessary to paint them, so that overlapping intervals are given different colors.

Linearization of Basic Blocks
reverse post-order





first :r3 ->c
second: r1->a

intervals once spill
spill To memory, Will interrupt variable Life cycle 

spill :need store/load placemeng


coalescing



live ranges with holes



graph coloring register allocation
the interference graph




simplification When , take node Put it on the stack at one time .
r3 - r1 - r2 - e - c - b - a - d
reverse order : d - a - b - c - e - r2 - r1 - r3
greedy coloring



iterated register coalescing








spilling heuristics


spilling



Among them d For example :2 yes d stay loop In addition to the def and use,10 To the power of d Of loop nesting factor yes 1, multiply 2 Because loop Within def and use two ,d Of degree by 4.













边栏推荐
- Stm32cubeide1.9.0\stm32cubemx 6.5 f429igt6 plus lan8720a, configure eth+lwip
- 管理系统-ITclub(上)
- 大厂常用软件测试面试题三(附答案)
- CDH集群之YARN性能调优
- Go from introduction to practice - error mechanism (note)
- Learn to go concurrent programming in 7 days go language sync Application and implementation of cond
- How to open an account for agricultural futures? How much is the handling charge for opening an account for futures? Who can give you a preferential handling charge?
- 渗透学习-靶场篇-dvwa靶场详细攻略(持续更新中-目前只更新sql注入部分)
- 单元测试界的高富帅,Pytest框架,手把手教学,以后测试报告就这么做~
- 軟件測試自動化測試之——接口測試從入門到精通,每天學習一點點
猜你喜欢

7 jours d'apprentissage de la programmation simultanée go 7 jours de programmation simultanée go Language Atomic Atomic Atomic actual Operation contains ABA Problems

Oracle obtains the beginning and end of the month time, and obtains the beginning and end of the previous month time

Go from introduction to actual combat - execute only once (note)

YOLOv6:又快又准的目标检测框架开源啦

结构化机器学习项目(二)- 机器学习策略(2)

Codeforces Round #723 (Div. 2)

Codeforces Round #719 (Div. 3)

Test birds with an annual salary of 50w+ are using this: JMeter script development -- extension function

Stm32f107+lan8720a use stm32subemx to configure network connection +tcp master-slave +udp app

average-population-of-each-continent
随机推荐
Example of using gbase 8A OLAP function group by grouping sets
AQS SOS AQS with me
大厂常用软件测试面试题三(附答案)
改善深层神经网络:超参数调试、正则化以及优化(三)- 超参数调试、Batch正则化和程序框架
管理系统-ITclub(中)
MySQL greater than less than or equal to symbol representation
Selenium上传文件有多少种方式?不信你有我全!
Experience sharing of meituan 20K Software Test Engineers
6G显卡显存不足出现CUDA Error:out of memory解决办法
Is flush stock trading software reliable?? Is it safe?
Do280openshift access control -- Security Policy and chapter experiment
Where can I set the slides on the front page of CMS applet?
Day8 - cloud information project introduction and creation
Go from introduction to practice - error mechanism (note)
Go from introduction to practice -- definition and implementation of behavior (notes)
Management system itclub (Part 2)
average-population-of-each-continent
Use Fiddler to simulate weak network test (2g/3g)
Codeforces Round #722 (Div. 2)
Yarn中RMApp、RMAppAttempt、RMContainer和RMNode状态机及其状态转移