This is an archive of the discontinued LLVM Phabricator instance.

[LegacyPM] Remove RewriteSymbolsLegacyPass
ClosedPublic

Authored by kazu on Jun 23 2023, 6:45 PM.

Diff Detail

Event Timeline

kazu created this revision.Jun 23 2023, 6:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2023, 6:45 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
kazu requested review of this revision.Jun 23 2023, 6:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2023, 6:45 PM
nikic accepted this revision.Jun 24 2023, 12:08 AM

LGTM

This revision is now accepted and ready to land.Jun 24 2023, 12:08 AM
This revision was landed with ongoing or failed builds.Jun 24 2023, 7:34 AM
This revision was automatically updated to reflect the committed changes.
srj added a subscriber: srj.Jun 26 2023, 10:32 AM

Is there any way to get this functionality without the LegacyPassManager?

Halide still relies on the LegacyPassManager for certain codegen paths, because (AFAIK) there is still no complete API to replace it with the newer PassManager. Our team would very much appreciate any pointers to how to modernize our usage in advance of Legacy API removal.

@srj Could you please share how you're currently using the pass? It's possible we just have to revert this, but hard to say without code.

srj added a comment.Jun 26 2023, 12:31 PM

@srj Could you please share how you're currently using the pass? It's possible we just have to revert this, but hard to say without code.

See the function emit_file here: https://github.com/halide/Halide/blob/main/src/LLVM_Output.cpp#L341

nikic added a comment.Jun 26 2023, 1:10 PM

@srj Could you please share how you're currently using the pass? It's possible we just have to revert this, but hard to say without code.

See the function emit_file here: https://github.com/halide/Halide/blob/main/src/LLVM_Output.cpp#L341

Thanks! You could run just that one pass separately with the NewPM, but that probably doesn't make a lot of sense.

I think we should revert this change for now and keep the pass until we have NewPM support for the codegen pipeline. @aeubanks What do you think?

srj added a comment.Jun 26 2023, 1:14 PM

I think we should revert this change for now and keep the pass until we have NewPM support for the codegen pipeline. @aeubanks What do you think?

Halide contributor Andrew Adams commented elsewhere: "It's an old commit. Hard to say if anyone is using the feature that this PR removes." I suspect that we can live without it until the entire API migration is done. (Is there an ETA for that? We've been hearing for years that it will happen...)

we could revert, but as you've alluded to I doubt that halide users are actually using this pass, for example I removed it from LLVM in https://reviews.llvm.org/D99707 without complaint

I'd remove the halide use and see if anybody complains, and if somebody does we can revert this patch

you could also add the corresponding new PM pass to the optimization pipeline that halide runs