leozp / Myia-Issues

0 stars 0 forks source link

FIRM 论文分析 #3

Open leozp opened 5 years ago

leozp commented 5 years ago

FIRM—A Graph-Based Intermediate Representation

FIRM Node Types and Signatures

FIRM construction optimizes

leozp commented 5 years ago

Definition

Keyword

Reducing the Number of φ-Functions

Extraneous φ-Functions:

  1. There might be φ-functions that no one references.
  2. There might be φ-functions where all arguments effectively have the same value at runtime.
    • Pruned SSA-form

      only create φ-functions as a result of a situation where someone will use it

    • Minimal SSA-form

      φ-functions for a variable v only occur at basic blocks where different definitions of v meet for the first time.

leozp commented 5 years ago

FIRM Node Types

Add B × Num × Num → Num 
Alloc B × M × Num → M × P 
And B × Num × Num → Num 
ASM B × variable → variable 
Bad → Any
Block X0 × · · · × Xn →→ B
Call B×Num0 ×···×Numk ×M →Num0 ×···×Numk ×M 
Cmp B×Num×Num→b0 ×···×b15
Cond B×b→X×X
Const → Num
Conv B × Num → Num
Div B × Num × Num → Num
End B×X→
Eor B × Num × Num → Num
Free B → M × P × Num
Jmp B→X
Load B × P × M → Num × M
Minus B × Num → Num
Mod B × Num × Num → Num
Mul B × Num × Num → Num
Mux B×b×Num×Num→Num
NoMem →M
Not B × Num → Num
Or B × Num × Num → Num
Phi B×Num0 ×···×Numn →Num
Proj B×T →Num
Return B × M × N um0 × · · · × N umn → X
Rotl B×Num×Num→Num
Sel B×M×P→M×P
Shl B×Num×Num→Num
Shr B×Num×Num→Num
Shrs B×Num×Num→Num
Start B→X×M×P×P×T
Store B × M × P × Num → M
Sub B×Num×Num→Num
SymConst B×P
Sync B × M0 × · · · × Mn → M
Unknown → Any