This is an archive of the discontinued LLVM Phabricator instance.

Clean up usages of asserting vector getters in Type
ClosedPublic

Authored by ctetreau on Apr 1 2020, 4:43 PM.

Details

Summary

Remove usages of asserting vector getters in Type in preparation for the
VectorType refactor. The existence of these functions complicates the
refactor while adding little value.

Diff Detail

Event Timeline

ctetreau created this revision.Apr 1 2020, 4:43 PM
ctetreau updated this revision to Diff 254581.Apr 2 2020, 11:53 AM

update to mention that this is NFC

sdesmalen added inline comments.Apr 6 2020, 8:47 AM
llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
2633

If you change this to

if (auto *VTy = dyn_cast<VectorType>(I.getOperand(i)->getType()) {

you don't need the regular casts below.

ctetreau updated this revision to Diff 255444.Apr 6 2020, 12:32 PM

address code review issues

sdesmalen accepted this revision.Apr 6 2020, 1:50 PM

Thanks, LGTM!

This revision is now accepted and ready to land.Apr 6 2020, 1:50 PM
This revision was automatically updated to reflect the committed changes.