This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Remove VectorType::getBitWidth()
ClosedPublic

Authored by ctetreau on Apr 9 2020, 3:08 PM.

Details

Summary
  • VectorType::getBitWidth() is just an unsafe version of

getPrimitiveSizeInBits() that assumes all vectors are fixed width.

Diff Detail

Event Timeline

ctetreau created this revision.Apr 9 2020, 3:08 PM
Herald added a project: Restricted Project. · View Herald Transcript

Makes sense.

llvm/lib/IR/Type.cpp
75

This seems a little messy. Maybe separate the vector/vector case from the vector/mmx case?

ctetreau updated this revision to Diff 256605.Apr 10 2020, 10:28 AM

address code review issues

This revision is now accepted and ready to land.Apr 10 2020, 10:39 AM
ctetreau updated this revision to Diff 259042.Apr 21 2020, 10:03 AM

Make this commit not depend on the existence of FixedVectorType

efriedma added inline comments.Apr 21 2020, 10:29 AM
llvm/lib/IR/Type.cpp
77

I think you broke this in the process of making it not depend on FixedVectorType?

ctetreau updated this revision to Diff 259086.Apr 21 2020, 12:55 PM

catch stragglers

ctetreau marked an inline comment as done.Apr 21 2020, 1:00 PM
ctetreau added inline comments.
llvm/lib/IR/Type.cpp
77

Yes I did, good catch. If only there were a FixedVectorType :)

ctetreau updated this revision to Diff 259089.Apr 21 2020, 1:00 PM

fix dumdum

efriedma accepted this revision.Apr 21 2020, 1:24 PM

LGTM. Please make a note to clean up Type::canLosslesslyBitCastTo later.

LGTM. Please make a note to clean up Type::canLosslesslyBitCastTo later.

It's cleaned up in D77587 which I plan to merge right after this goes in

This revision was automatically updated to reflect the committed changes.