Skip to content

Conversation

@axelcool1234
Copy link
Contributor

@axelcool1234 axelcool1234 commented Jan 21, 2026

I currently have an untested function getDominanceInfo. I'm starting to suspect that the Cooper-Harvey-Kennedy algorithm I based this off of might not be the best way forward here because MLIR doesn't explicitly store block predecessors and successors.

There are many issues I have with my current implementation.

  • instead of returning an array of BlockPtrs that doesn't even have any meaning beyond the internal mapping I create (and then discard), I should create a DomTree data structure to return instead (this is what LLVM and MLIR do).
  • The visitPostOrder function is an absolute abomination - a consequence to how new I am to Lean.
  • There are no tests yet.

This is my progress so far but I think I'm going to end up rewriting most if it soon.

@axelcool1234 axelcool1234 marked this pull request as draft January 21, 2026 21:28
@axelcool1234
Copy link
Contributor Author

I am currently working on implementing a dominance tree data structure that closely mirrors with the one defined in LLVM: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/Support/GenericDomTree.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant