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:46 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:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2020, 4:46 PM
ctetreau updated this revision to Diff 254585.Apr 2 2020, 12:02 PM

Update to mention that this is NFC

sdesmalen added inline comments.Apr 6 2020, 9:19 AM
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
682–683

Can you move this line to just above the check for if (!ArgTy), just to make it clear that it can be nullptr and should not be used in between the definition and that check.

llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
1825

nit: maybe put the comment above the if statement?

ctetreau updated this revision to Diff 255450.Apr 6 2020, 12:52 PM

Address code review issues

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

LGTM!

This revision is now accepted and ready to land.Apr 6 2020, 1:51 PM
ctetreau updated this revision to Diff 255543.Apr 6 2020, 5:06 PM

remove new usages

This revision was automatically updated to reflect the committed changes.