forked from zjuacompiler/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Legalize Types
Qiping Li edited this page Sep 29, 2015
·
1 revision
功能:更新Value对应的节点的状态
功能: 更新节点的状态,同时更新operand的状态(沿着Operand上去)
- 在Analysisnewvalue时调用
- 在LegalizeOprand时调用
- 在ReplaceValueWith时调用,会把节点添加到NodesToAnalysis,在NodeUpdate或者NodeDelete的时候会添加。
具体还需要再分析一下NodeUpdate和NodeDelete什么时候被调用,也就是
DAG.ReplaceAllUsesOfValueWith的过程。
- 在legalize过程中新建的节点,通过getNode方法获得的节点
- 一个节点被morph into另外一个节点
- 所有使用NewNode的节点都会被标记为NewNode
主要用在check中,用在expensivecheck和expungenode中。
用途:用于remap, map一个value到另一个value
- remapped values are only used by nodes marked NewNode
- final result of applying replacedvalues is not marked newnode