This is an archive of the discontinued LLVM Phabricator instance.

[ObjCARC] Remove legacy PM versions of optimization passes
ClosedPublic

Authored by aeubanks on Oct 2 2022, 1:23 PM.

Details

Summary

This doesn't touch objc-arc-contract because that's in the codegen pipeline.
However, this does move its corresponding initialize function into initializeCodegen().

Diff Detail

Event Timeline

aeubanks created this revision.Oct 2 2022, 1:23 PM
aeubanks requested review of this revision.Oct 2 2022, 1:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 2 2022, 1:23 PM
nikic added a subscriber: nikic.Oct 2 2022, 1:29 PM
nikic added inline comments.
llvm/test/Transforms/ObjCARC/apelim.ll
1

Duplicate test line

llvm/test/Transforms/ObjCARC/move-and-merge-autorelease.ll
1

Unusual spelling, surprised this even works

aeubanks updated this revision to Diff 464571.Oct 2 2022, 1:41 PM

fix tests

aeubanks added inline comments.Oct 2 2022, 1:52 PM
llvm/test/Transforms/ObjCARC/move-and-merge-autorelease.ll
1

it happened to pass with just objc-arc-contract, but anyway made it closer to the original test

Test updates could have been a separate NFC so review centers on the LPM passes removal / move to codegen only.

llvm/test/Transforms/ObjCARC/contract-end-of-use-list.ll
1

Add to single -passes= pipeline?

aeubanks updated this revision to Diff 468605.Oct 18 2022, 10:00 AM

rebase past test changes commit

asbirlea accepted this revision.Oct 20 2022, 1:34 PM

Changes LGTM.

This revision is now accepted and ready to land.Oct 20 2022, 1:34 PM
This revision was landed with ongoing or failed builds.Oct 21 2022, 1:44 PM
This revision was automatically updated to reflect the committed changes.
uabelho added inline comments.
llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
2486

Looks like this method is unused after this patch.
gcc warns with

00:13:01 ../lib/Transforms/ObjCARC/ObjCARCOpts.cpp:2486:6: warning: 'void {anonymous}::ObjCARCOpt::releaseMemory()' defined but not used [-Wunused-function]
00:13:01  2486 | void ObjCARCOpt::releaseMemory() {
00:13:01       |      ^~~~~~~~~~

Can we remove it or is will it be used somewhere?

aeubanks added inline comments.Oct 25 2022, 8:00 AM
llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
2486

sorry about that, somebody fixed this in https://reviews.llvm.org/D136665