This is an archive of the discontinued LLVM Phabricator instance.

[mlir:Function][NFC] Use BitVector instead of ArrayRef for indices when removing arguments/results
ClosedPublic

Authored by rriddle on Jan 24 2022, 3:18 PM.

Details

Summary

We already convert to BitVector internally, and other APIs (namely Operation::eraseOperands)
already use BitVector as well. Switching over provides a common format between
API and also reduces the amount of format conversions necessary.

Fixes #53325

Diff Detail

Event Timeline

rriddle created this revision.Jan 24 2022, 3:18 PM
rriddle requested review of this revision.Jan 24 2022, 3:18 PM
This revision is now accepted and ready to land.Jan 24 2022, 6:37 PM
jpienaar accepted this revision.Jan 24 2022, 6:41 PM

Thanks!

mlir/include/mlir/IR/BuiltinTypes.h
16

Should this be in Support/LLVM.h too? Or not as general as the rest there?

rriddle marked an inline comment as done.Jan 26 2022, 3:13 PM

NFC?

Yep, thanks.

mlir/include/mlir/IR/BuiltinTypes.h
16

We could add it there given how much it's used. I'll do that and a few other common ones in followups.

rriddle retitled this revision from [mlir:Function] Use BitVector instead of ArrayRef for indices when removing arguments/results to [mlir:Function][NFC] Use BitVector instead of ArrayRef for indices when removing arguments/results.Jan 26 2022, 3:13 PM
rriddle updated this revision to Diff 403425.Jan 26 2022, 3:50 PM
rriddle edited the summary of this revision. (Show Details)
rriddle marked an inline comment as done.
This revision was landed with ongoing or failed builds.Jan 26 2022, 9:38 PM
This revision was automatically updated to reflect the committed changes.