This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Transform] Fix PrintOp::build with StringRef
Needs ReviewPublic

Authored by JoeyYe_HW on Sep 20 2023, 7:00 AM.

Details

Reviewers
nicolasvasilache
Summary

transform::PrintOp::build(OpBuilder &builder, OperationState &result, StringRef name) does not set name correctly. Calling PrintOp::build(builder, result, "whatever name") is going to end up with a PrintOp with no name.

This patch fixes it by replicating the approach from tablegen created code. Refer to build/mlir/include/mlir/Dialect/Transform/IR/TransformOps.cpp.inc

Diff Detail

Event Timeline

JoeyYe_HW created this revision.Sep 20 2023, 7:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2023, 7:00 AM
JoeyYe_HW requested review of this revision.Sep 20 2023, 7:00 AM