Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
alcinnz
alcinnz
@alcinnz@floss.social  ·  activity timestamp 6 days ago

Continuing my exploration of reimplementing an optimizing compiler to run on our hypothetical string-centric CPU... We need to extract additional info from the control-flow graph!

The "dominators" of a block are those which necessarily runs before it, simply due to the graph's structure. We can compute by iterating over each block's predecessors & taking the closest common ancestor between them as the block's dominator, until fixpoint. I'd task our "Arithmetic Core" coprocessor with this.

1/2?

  • Copy link
  • Flag this post
  • Block
alcinnz
alcinnz
@alcinnz@floss.social replied  ·  activity timestamp 6 days ago

Where a block's dominance ends is referred to as its "dominance frontier", which will prove to be a vital concept when compiling code for an AVR microcontroller!

For each block we compute this by traversing up its dominators & checking whether it matches a dominator of either successor. If so that successor is added to the dominator's frontier. Which we can track as an array.

I'd also task our Arithmetic Core with this computation.

With that & the liveness info... We can establish SSA!

2/2!

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-beta.28 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct