[PATCH] D94547: [lld-macho] Run ObjCContractPass during LTO

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 12:45:10 PST 2021


int3 created this revision.
int3 added reviewers: lld-macho, wenlei, lanza.
Herald added subscribers: dang, steven_wu, hiraditya, inglorion.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Run the ObjCARCContractPass during LTO. The legacy LTO backend (under
LTO/ThinLTOCodeGenerator.cpp) already does this; this diff just adds that
behavior to the new LTO backend. Without that pass, the objc.clang.arc.use
intrinsic will get passed to the instruction selector, which doesn't know how to
handle it.

In order to test both the new and old pass managers, I've also added support for
the `--[no-]lto-legacy-pass-manager` flags.

P.S. Not sure if the ordering of the pass within the pipeline matters...


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94547

Files:
  lld/MachO/Config.h
  lld/MachO/Driver.cpp
  lld/MachO/LTO.cpp
  lld/MachO/Options.td
  lld/test/MachO/objc-arc-contract.ll
  llvm/lib/LTO/LTOBackend.cpp
  llvm/lib/Passes/PassBuilder.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94547.316204.patch
Type: text/x-patch
Size: 4970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210112/cd95d0bb/attachment.bin>


More information about the llvm-commits mailing list