This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Don't allocate an operand storage if the operation is known to never have operands
ClosedPublic

Authored by rriddle on Apr 26 2020, 2:32 AM.

Details

Summary

Certain classes of operations, such as FuncOp, are known to never have operands. This revision adds a bit to operation to detect this case and avoid allocating the unnecessary operand storage. This saves 1 word for each instance of these operations.

Depends On D78875

Diff Detail

Event Timeline

rriddle created this revision.Apr 26 2020, 2:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2020, 2:32 AM
mehdi_amini accepted this revision.Apr 26 2020, 6:56 PM
mehdi_amini added inline comments.
mlir/lib/IR/Operation.cpp
113

Nice!

This revision is now accepted and ready to land.Apr 26 2020, 6:56 PM
This revision was automatically updated to reflect the committed changes.