Page MenuHomePhabricator

[CodeGen] Add larger vector types for i32 and f32
ClosedPublic

Authored by ThomasR on Jul 3 2019, 10:12 AM.

Details

Summary

Some out of tree backend require larger vector type. Since maintaining the changes out of tree is difficult due to the many manual changes needed when adding a new type we are adding it even if no backend currently use it.

Diff Detail

Repository
rL LLVM

Event Timeline

ThomasR created this revision.Jul 3 2019, 10:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 3 2019, 10:12 AM

Most of this looks mechanical; I don't think the MVT changes should be contentious. However, the "is65536BitVector()" predicates are starting to get a bit unwieldy to read.

Does an out of tree target need these predicates? I feel they're sufficiently unreadable to either change the format ("is64kBitVector"?) or elide them for larger types.

Cheers,

James

llvm/lib/CodeGen/ValueTypes.cpp
111 ↗(On Diff #207824)

[Formatting] Space missing here.

ThomasR updated this revision to Diff 207852.Jul 3 2019, 11:34 AM

Add missing space

ThomasR marked an inline comment as done.Jul 3 2019, 11:36 AM

Most of this looks mechanical; I don't think the MVT changes should be contentious. However, the "is65536BitVector()" predicates are starting to get a bit unwieldy to read.

Does an out of tree target need these predicates? I feel they're sufficiently unreadable to either change the format ("is64kBitVector"?) or elide them for larger types.

Cheers,

James

I agree, it is not really needed I added it for consistency. I don't mind changing it to the format suggested. Which ones do you think should be changed?

majnemer accepted this revision.Jul 3 2019, 11:38 AM

LGTM

Most of this looks mechanical; I don't think the MVT changes should be contentious. However, the "is65536BitVector()" predicates are starting to get a bit unwieldy to read.

Does an out of tree target need these predicates? I feel they're sufficiently unreadable to either change the format ("is64kBitVector"?) or elide them for larger types.

Cheers,

James

I agree, it is not really needed I added it for consistency. I don't mind changing it to the format suggested. Which ones do you think should be changed?

It doesn't look like is2048BitVector() is used, maybe we just don't add any new predicates until a use-case comes up?

This revision is now accepted and ready to land.Jul 3 2019, 11:38 AM
jmolloy accepted this revision.Jul 3 2019, 11:38 AM

Not adding new predicates SGTM.

ThomasR updated this revision to Diff 207908.Jul 3 2019, 4:00 PM
ThomasR updated this revision to Diff 207916.Jul 3 2019, 4:21 PM

fix spacing

This revision was automatically updated to reflect the committed changes.