This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Value] Add v.getDefiningOp<OpTy>()
ClosedPublic

Authored by silvas on May 9 2020, 5:54 PM.

Details

Summary

This makes a common pattern of
dyn_cast_or_null<OpTy>(v.getDefiningOp()) more concise.

Diff Detail

Event Timeline

silvas created this revision.May 9 2020, 5:54 PM
Herald added a reviewer: herhut. · View Herald Transcript
Herald added 1 blocking reviewer(s): rriddle. · View Herald Transcript
Herald added a reviewer: aartbik. · View Herald Transcript
Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
mehdi_amini accepted this revision.May 9 2020, 6:10 PM
ftynse accepted this revision.May 10 2020, 4:53 AM
This revision was not accepted when it landed; it landed in state Needs Review.May 11 2020, 12:56 PM
This revision was automatically updated to reflect the committed changes.
rriddle added inline comments.May 27 2020, 12:19 PM
mlir/include/mlir/IR/Value.h
123

nit: Drop the llvm::