This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Remove IITDescriptor::ScalableVecArgument
ClosedPublic

Authored by david-arm on May 17 2020, 11:51 PM.

Details

Summary

I have refactored the code so that we no longer need the
ScalableVecArgument descriptor - the scalable property of vectors is
now encoded using the ElementCount class in IITDescriptor. This means
that when matching intrinsics we know precisely how to match the
arguments and return values.

Diff Detail

Event Timeline

david-arm created this revision.May 17 2020, 11:51 PM
Herald added a project: Restricted Project. · View Herald Transcript
ctetreau added inline comments.May 18 2020, 7:55 AM
llvm/include/llvm/IR/Intrinsics.h
102

Please clang-format this

111

Why not 31?

efriedma added inline comments.May 18 2020, 1:52 PM
llvm/include/llvm/IR/Intrinsics.h
110

Can you just use ElementCount here, instead of defining your own struct?

If you do think it's necessary to pack this struct, please ensure that the struct can hold all the values ElementCount can hold. I don't want the possibility of new mysterious failures due to overflow.

david-arm updated this revision to Diff 264813.May 19 2020, 1:16 AM
david-arm marked 4 inline comments as done.
david-arm added inline comments.
llvm/include/llvm/IR/Intrinsics.h
110

ElementCount isn't designed to be embedded in another structures, but I do take your point. I've done something similar to how it's done in VectorType - made sure we have enough storage for the element count and added a getVectorElementCount() helper that returns a ElementCount.

david-arm updated this revision to Diff 264842.May 19 2020, 3:58 AM
david-arm marked an inline comment as done.
david-arm edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.May 19 2020, 12:36 PM
This revision was automatically updated to reflect the committed changes.