Skip to content

Commit

Permalink
Update IREEOptToolEntryPoint.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ita9naiwa authored Feb 16, 2025
1 parent c2cb11a commit d668afc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions compiler/src/iree/compiler/API/Internal/IREEOptToolEntryPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,19 @@ static LogicalResult ireeOptMainFromCL(int argc, char **argv,
const_cast<TargetRegistry &>(TargetRegistry::getGlobal())
.mergeFrom(pluginTargetBackendList);

// brought from mlir-opt MlirOptMain.cpp
// printRegisteredDialects and printRegisteredPassesAndReturn
if (config.shouldShowDialects()) {
llvm::outs() << "Available Dialects: ";
interleave(registry.getDialectNames(), llvm::outs(), ",");
llvm::outs() << "\n";
return success();
}
if (config.shouldListPasses()) {
mlir::printRegisteredPasses();
return success();
}

// When reading from stdin and the input is a tty, it is often a user mistake
// and the process "appears to be stuck". Print a message to let the user know
// about it!
Expand Down

0 comments on commit d668afc

Please sign in to comment.