This is an archive of the discontinued LLVM Phabricator instance.

[APInt] Deprecate several functions
ClosedPublic

Authored by kazu on Feb 20 2023, 12:08 PM.

Details

Summary

This patch deprecates:

  • those functions that have been soft-deprecated
  • count{Leading,Trailing}{Zero,Ones}
  • countPopulation

Note that I've already migrated away from all known uses of these
functions.

Diff Detail

Event Timeline

kazu created this revision.Feb 20 2023, 12:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2023, 12:08 PM
kazu requested review of this revision.Feb 20 2023, 12:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2023, 12:08 PM
arsenm added a subscriber: arsenm.Feb 20 2023, 12:34 PM
arsenm added inline comments.
llvm/include/llvm/ADT/APInt.h
1559

I think this is a way worse name

1577

Ditto

1600

Ditto

These functions are obscure and don't seem to have much use, so I think they can just be removed. You may wait a bit for my patch to migrate away https://github.com/tensorflow/mlir-hlo/blob/master/mhlo/IR/hlo_ops.cc

MaskRay accepted this revision.Feb 20 2023, 12:44 PM
This revision is now accepted and ready to land.Feb 20 2023, 12:44 PM
xbolva00 added inline comments.
llvm/include/llvm/ADT/APInt.h
1587

This function is an APInt version of the std::countr_zero.

kazu updated this revision to Diff 502521.Mar 5 2023, 10:35 PM

Address comments.

kazu marked 4 inline comments as done.Mar 5 2023, 10:36 PM
kazu added inline comments.
llvm/include/llvm/ADT/APInt.h
1559

OK. I am not deprecating this function for now.

kazu updated this revision to Diff 502522.Mar 5 2023, 10:48 PM
kazu marked an inline comment as done.

Deprecate countPopulation as before.

This revision was landed with ongoing or failed builds.Mar 5 2023, 10:48 PM
This revision was automatically updated to reflect the committed changes.