This is an archive of the discontinued LLVM Phabricator instance.

[NFC][OpaquePtr] Avoid using PointerType::getElementType() in VectorUtils.cpp
ClosedPublic

Authored by aeubanks on May 14 2021, 2:02 PM.

Diff Detail

Unit TestsFailed

Event Timeline

aeubanks created this revision.May 14 2021, 2:02 PM
aeubanks requested review of this revision.May 14 2021, 2:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 14 2021, 2:02 PM
nikic added a subscriber: nikic.May 14 2021, 2:11 PM
nikic added inline comments.
llvm/lib/Analysis/VectorUtils.cpp
967

Depending on how common the pattern is, it might make sense to add getLoadStoreType to complement getLoadStorePointerOperand (and getLoadStoreAlignment and getLoadStoreAddressSpace).

dblaikie added inline comments.May 14 2021, 5:37 PM
llvm/lib/Analysis/VectorUtils.cpp
967

Yeah, +1. There's something like 40 calls to this function, so probably worth having an opaque pointer equivalent.

aeubanks updated this revision to Diff 345934.May 17 2021, 10:42 AM

create and use getLoadStoreType()

nikic accepted this revision.May 17 2021, 2:01 PM

LGTM

This revision is now accepted and ready to land.May 17 2021, 2:01 PM