hyperledger / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.22k stars 206 forks source link

Solang's intermediate representation should use SSA #923

Open LucasSte opened 1 year ago

LucasSte commented 1 year ago

Solang's intermediate representation does not use a static single assignment (SSA) form. This has introduced some ugliness in our code base. For instance, we have two three different implementations of reaching definitions: one for strength reduce, another for the vector to slice pass and a third one for all other optimization passes.

Advantages

Caveats

Challenges

LucasSte commented 1 year ago

Please, @seanyoung and @xermicus, join the discussion!

seanyoung commented 1 year ago

I think this is closer than we think: in CFG we already have phi nodes. We just need to vars assign-once