This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Remove uses of Type::getPointerTo() (NFC)
ClosedPublic

Authored by JOE1994 on Jul 3 2023, 2:53 PM.

Details

Summary

Partial progress towards removing in-tree uses of getPointerTo(),
by employing the following options:

  • Drop the call entirely if the sole purpose of it is to support a no-op bitcast (remove the no-op bitcast as well).
  • Replace with PointerType::get()/PointerType::getUnqual().

Also, remove no-op function EmitBitCastOfLValueToProperType().

Diff Detail

Event Timeline

JOE1994 created this revision.Jul 3 2023, 2:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 3 2023, 2:53 PM
JOE1994 requested review of this revision.Jul 3 2023, 2:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 3 2023, 2:53 PM
nikic accepted this revision.Jul 4 2023, 7:49 AM

LGTM

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
1212–1213

Replace VecPtr variable with PtrOp?

1231–1232

Same here

This revision is now accepted and ready to land.Jul 4 2023, 7:49 AM

This needs clang-format

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
5152

Inline the variable?

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
1212–1213

Inline the variable?

1231–1232

Ditto

llvm/lib/Target/X86/X86InterleavedAccess.cpp
202
JOE1994 updated this revision to Diff 538377.Jul 8 2023, 10:01 AM
  • Apply feedback from reviewers
  • git clang-format
  • Rebase onto latest main
This revision was landed with ongoing or failed builds.Jul 8 2023, 10:07 AM
This revision was automatically updated to reflect the committed changes.