This is an archive of the discontinued LLVM Phabricator instance.

[LightAttributor] Run only as CGSCCPass.
Needs ReviewPublic

Authored by fhahn on Jun 4 2023, 9:16 AM.

Details

Summary

Depends on D152081.

Diff Detail

Event Timeline

fhahn created this revision.Jun 4 2023, 9:16 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2023, 9:16 AM
fhahn requested review of this revision.Jun 4 2023, 9:16 AM
Herald added a reviewer: sstefan1. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
fhahn retitled this revision from [LightAttributor] Run only as CFSCCPass. to [LightAttributor] Run only as CGSCCPass..Jun 4 2023, 9:21 AM
nikic added a subscriber: nikic.Jun 4 2023, 9:23 AM
nikic added inline comments.
llvm/lib/Passes/PassBuilderPipelines.cpp
887

Supporting the SkipNonRecursive flag should improve compile-time a good bit. We only need to infer attributes at this pipeline position for non-trivial SCCs.

arsenm added a subscriber: arsenm.Jun 4 2023, 9:38 AM
arsenm added inline comments.
llvm/lib/Passes/PassBuilderPipelines.cpp
260

Can you combine this with the attributor-enable flag? I dislike having various overlapping pass control flags

fhahn marked 2 inline comments as done.Jun 4 2023, 12:53 PM
fhahn added inline comments.
llvm/lib/Passes/PassBuilderPipelines.cpp
260

Will do I was hoping for more promising compile-time data to have clear path towards enabling it for attribute inference, but at the moment the data doesn't look very promising unfortunately

887

When we use PostOrderFunctionAttrsPass(/*SkipNonRecursive*/ true) and LightweightAttributorCGSCCPass only at the other position, there's unfortunately still a ~2% regression: https://llvm-compile-time-tracker.com/compare.php?from=3a458256ee22a0e7c31529de42fa6caa263d88fe&to=3e8ea897fa2533f52488b7ceab27f6b0d91599dc&stat=instructions%3Au

jdoerfert added inline comments.
llvm/lib/Passes/PassBuilderPipelines.cpp
887

We'll add a skip non recursive option. @tianshilei1992 and I will look into potential regressions.