This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Expose Value hierarchy to C API
ClosedPublic

Authored by ftynse on Oct 19 2020, 10:18 AM.

Details

Summary

The Value hierarchy consists of BlockArgument and OpResult, both of which
derive Value. Introduce IsA functions and functions specific to each class,
similarly to other class hierarchies. Also, introduce functions for
pointer-comparison of Block and Operation that are necessary for testing and
are generally useful.

Diff Detail

Unit TestsFailed

Event Timeline

ftynse created this revision.Oct 19 2020, 10:18 AM
ftynse requested review of this revision.Oct 19 2020, 10:18 AM
mehdi_amini accepted this revision.Oct 19 2020, 3:04 PM
mehdi_amini added inline comments.
mlir/include/mlir-c/IR.h
414

Also document the behavior if the value is an OpResult?

423

Document the behavior if the value is a block argument?

This revision is now accepted and ready to land.Oct 19 2020, 3:04 PM
ftynse updated this revision to Diff 299285.Oct 20 2020, 12:38 AM
ftynse marked 2 inline comments as done.

Review

This revision was landed with ongoing or failed builds.Oct 20 2020, 12:39 AM
This revision was automatically updated to reflect the committed changes.