This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Use SmallBitVector instead of SmallDenseSet for AffineMap::compressSymbols
ClosedPublic

Authored by bkramer on Feb 6 2022, 5:17 AM.

Details

Summary

This is both more efficient and more ergonomic to use, as inverting a
bit vector is trivial while inverting a set is annoying.

Sadly this leaks into a bunch of APIs downstream, so adapt them as well.

This would be NFC, but there is an ordering dependency in MemRefOps's
computeMemRefRankReductionMask. This is now deterministic, previously it
was dependent on SmallDenseSet's unspecified iteration order.

Diff Detail

Event Timeline

bkramer created this revision.Feb 6 2022, 5:17 AM
bkramer requested review of this revision.Feb 6 2022, 5:17 AM
rriddle accepted this revision.Feb 6 2022, 12:38 PM

Nice.

mlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
1739

Is this mlir:: necessary?

mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
940

Is the mlir:: here necessary?

This revision is now accepted and ready to land.Feb 6 2022, 12:38 PM
This revision was landed with ongoing or failed builds.Feb 6 2022, 3:24 PM
This revision was automatically updated to reflect the committed changes.