Page MenuHomePhabricator

[MLIR] Replace splitBlock() with createBlock in GenericAtomicRMWOp lowering.
ClosedPublic

Authored by pifon2a on Apr 23 2020, 10:30 AM.

Details

Summary

addArgument() is not undoable and should not be used in ConversionPattern, therefore replacing splitBlock() with createBlock(), that creates a block with specified args.

Diff Detail

Event Timeline

pifon2a created this revision.Apr 23 2020, 10:30 AM
Herald added a project: Restricted Project. · View Herald Transcript

splitBlock is not undoable and should not be used in ConversionPattern.

splitBlock _is_ undoable, it's adding an argument to the block that is not

pifon2a updated this revision to Diff 259671.Apr 23 2020, 12:18 PM

Updated the description.

pifon2a edited the summary of this revision. (Show Details)Apr 23 2020, 12:19 PM
pifon2a edited the summary of this revision. (Show Details)

splitBlock is not undoable and should not be used in ConversionPattern.

splitBlock _is_ undoable, it's adding an argument to the block that is not

Thanks and PTAL.

ftynse accepted this revision.Apr 24 2020, 5:53 AM
ftynse added inline comments.
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
2865

IIRC, clone does this internally.

This revision is now accepted and ready to land.Apr 24 2020, 5:53 AM
pifon2a updated this revision to Diff 260106.Apr 25 2020, 8:40 AM

Addressed the comment.

pifon2a marked an inline comment as done.Apr 25 2020, 8:40 AM
This revision was automatically updated to reflect the committed changes.