This is an archive of the discontinued LLVM Phabricator instance.

[mlir][AsmPrinter] Remove recursion while SSA naming
ClosedPublic

Authored by Chia-hungDuan on May 11 2021, 2:57 AM.

Details

Summary

Address the TODO of removing recursion while SSA naming.

Diff Detail

Event Timeline

Chia-hungDuan created this revision.May 11 2021, 2:57 AM
Chia-hungDuan requested review of this revision.May 11 2021, 2:58 AM
mehdi_amini accepted this revision.May 11 2021, 9:52 AM
mehdi_amini added inline comments.
mlir/lib/IR/AsmPrinter.cpp
850

What about adding the Region* here? So that you can have a single SmallVector to drive the iterative loop?

883

Please keep auto to places where it improves readability.

This revision is now accepted and ready to land.May 11 2021, 9:52 AM

Address review comments

  1. Use explict type for auto
  2. Use one SmallVector
Chia-hungDuan marked 2 inline comments as done.May 11 2021, 8:20 PM
Chia-hungDuan added inline comments.
mlir/lib/IR/AsmPrinter.cpp
850

Sure, either way is fine to me. Done!

This revision was landed with ongoing or failed builds.May 11 2021, 8:32 PM
This revision was automatically updated to reflect the committed changes.
Chia-hungDuan marked an inline comment as done.
rriddle added inline comments.May 12 2021, 12:56 PM
mlir/lib/IR/AsmPrinter.cpp
847

Types should be CamelCase.

859

You need a naming context for the top-level operation, otherwise this will crash.

876–877
881–882