This is an archive of the discontinued LLVM Phabricator instance.

[NewPM] Port MergeFunctions pass
ClosedPublic

Authored by nikic on Jan 10 2020, 1:11 PM.

Details

Summary

This ports the MergeFunctions pass to the NewPM. This was rather straightforward, as no analyses are used.

Additionally MergeFunctions needs to be conditionally enabled in the PassBuilder, but I left that part out of this patch.

Diff Detail

Event Timeline

nikic created this revision.Jan 10 2020, 1:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 10 2020, 1:11 PM
leonardchan accepted this revision.Jan 13 2020, 10:58 AM

LGTM with just one quick question

llvm/lib/Transforms/IPO/MergeFunctions.cpp
327

I don't suppose you know off the top of your head if not doing something like skipModule will have any impact to build times?

This revision is now accepted and ready to land.Jan 13 2020, 10:58 AM
nikic marked an inline comment as done.Jan 14 2020, 11:28 AM
nikic added inline comments.
llvm/lib/Transforms/IPO/MergeFunctions.cpp
327

I believe skipModule() in legacy PM is only used for the opt-bisect functionality, so this shouldn't impact build times.

This revision was automatically updated to reflect the committed changes.
hoy added a subscriber: hoy.Jan 17 2021, 2:11 PM
hoy added inline comments.
llvm/include/llvm/Transforms/IPO/MergeFunctions.h
8

Hello, the comment doesn't seem to be appropriate according to what the MergeFunctionsPass does. Should it be removed? Please correct me if I'm wrong. Thanks.