You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we crate a new Function in IR it automatically gets a single entry block where execution begins and where new instructions will initially be added.
While implementing the constdemotion pass in #4336 I had it creating a block before the entry block. This meant that the block called 'entry' might not actually be the first block, and in turn I found some parts of the compiler which made this assumption.
We should make sure we don't make any assumptions about the name of the entry block, or any block really, and instead use an explicit API to fetch the entry block as the first block (not the block called entry).
We could also consider whether it's good design to create the implicit entry block upon Function creation or not.
The text was updated successfully, but these errors were encountered:
When we crate a new
Function
in IR it automatically gets a singleentry
block where execution begins and where new instructions will initially be added.While implementing the
constdemotion
pass in #4336 I had it creating a block before the entry block. This meant that the block called 'entry' might not actually be the first block, and in turn I found some parts of the compiler which made this assumption.We should make sure we don't make any assumptions about the name of the entry block, or any block really, and instead use an explicit API to fetch the entry block as the first block (not the block called
entry
).We could also consider whether it's good design to create the implicit entry block upon
Function
creation or not.The text was updated successfully, but these errors were encountered: