This is an archive of the discontinued LLVM Phabricator instance.

[NFC][TTI] Explicit use of VectorType
ClosedPublic

Authored by samparker on Apr 17 2020, 3:56 AM.

Details

Summary

The API for shuffles and reductions uses generic Type parameters, instead of VectorType, and so assertions and casts are used a lot. This patch makes those types explicit, which means that the clients have to be explit, meaning they can't be lazy and ambiguous, but that can only be a good thing.

Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=45562

Diff Detail

Event Timeline

samparker created this revision.Apr 17 2020, 3:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2020, 3:56 AM
samparker updated this revision to Diff 258289.Apr 17 2020, 4:40 AM

Removed a couple more casts and assertions.

RKSimon accepted this revision.Apr 17 2020, 4:54 AM

LGTM - you just need to clean up a few missed uses of auto with cast<>. Cheers.

llvm/lib/Analysis/TargetTransformInfo.cpp
1305

auto

llvm/lib/Transforms/Vectorize/VectorCombine.cpp
61

auto

This revision is now accepted and ready to land.Apr 17 2020, 4:54 AM
This revision was automatically updated to reflect the committed changes.