当前位置:网站首页>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.













边栏推荐
- Remote invocation of microservices
- Summary of gbase 8A database user password security related parameters
- Start the start php
- 从学生到工程师的蜕变之路
- 对话乔心昱:用户是魏牌的产品经理,零焦虑定义豪华
- regular expression
- Experience sharing of meituan 20K Software Test Engineers
- 北京邮电大学|用于成本和延迟敏感的虚拟网络功能放置和路由的多智能体深度强化学习
- OpenSSL programming I: basic concepts
- 软件缺陷管理——测试人员必会
猜你喜欢
![\W and [a-za-z0-9_], \Are D and [0-9] equivalent?](/img/96/2649c9cf95b06887b57fd8af2d41c2.png)
\W and [a-za-z0-9_], \Are D and [0-9] equivalent?

Crawler notes (3) -selenium and requests

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

6G显卡显存不足出现CUDA Error:out of memory解决办法

Conversation Qiao Xinyu: l'utilisateur est le gestionnaire de produits Wei Brand, zéro anxiété définit le luxe

Système de gestion - itclub (II)

管理系统-ITclub(下)

Infiltration learning - problems encountered during SQL injection - explanation of sort=left (version(), 1) - understanding of order by followed by string

渗透学习-sql注入过程中遇到的问题-针对sort=left(version(),1)的解释-对order by后接字符串的理解

Summary of Web testing and app testing by bat testing experts
随机推荐
Acwing weekly contest 57- digital operation - (thinking + decomposition of prime factor)
[sword offer ii] sword finger offer II 029 Sorted circular linked list
Deep learning has a new pit! The University of Sydney proposed a new cross modal task, using text to guide image matting
Typescript learning
改善深层神经网络:超参数调试、正则化以及优化(三)- 超参数调试、Batch正则化和程序框架
单元测试界的高富帅,Pytest框架,手把手教学,以后测试报告就这么做~
如何做好功能测试?你确定不想知道吗?
Contest 2050 and Codeforces Round #718 (Div. 1 + Div. 2)
CUDA error:out of memory caused by insufficient video memory of 6G graphics card
Matlab finds the position of a row or column in the matrix
Penetration learning - shooting range chapter -dvwa shooting range detailed introduction (continuous updating - currently only the SQL injection part is updated)
百万年薪独家专访,开发人员不修复bug怎么办?
【Redis】零基础十分钟学会Redis
不外泄的测试用例设计秘籍--模块测试
軟件測試自動化測試之——接口測試從入門到精通,每天學習一點點
使用Jmeter进行性能测试的这套步骤,涨薪2次,升职一次
管理系统-ITclub(上)
Yarn中RMApp、RMAppAttempt、RMContainer和RMNode状态机及其状态转移
Example of using gbase 8A OLAP function group by grouping sets
Professor of Tsinghua University: software testing has gone into a misunderstanding - "code is necessary"