eirproject / eir

Erlang ecosystem common IR
Apache License 2.0
252 stars 8 forks source link

Don't attempt to duplicate body into multiple entry points unless actually benifitial #29

Closed hansihe closed 4 years ago

hansihe commented 4 years ago

Right now the graph simplification pass will copy the target body into all new targets whenever it can.

This bloats the IR and can cause unnecessary issues for codegen.

Instead we only want to do this if the value usages of the body actually varies between the different target bodies.