This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Return false from LiveIntervals::runOnMachineFunction
ClosedPublic

Authored by foad on Feb 16 2022, 7:44 AM.

Details

Summary

This is an analysis pass so it does not modify the MachineFunction.

Diff Detail

Event Timeline

foad created this revision.Feb 16 2022, 7:44 AM
foad requested review of this revision.Feb 16 2022, 7:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2022, 7:44 AM

Looks good. I've got the feeling that we could do something at the analysis level to make sure we never return true for an analysis.

This revision is now accepted and ready to land.Feb 16 2022, 7:59 AM
foad added a comment.Feb 16 2022, 8:16 AM

I've got the feeling that we could do something at the analysis level to make sure we never return true for an analysis.

Maybe, but I thought the legacy pass manager generally did not distinguish analysis passes from non-analysis passes.

I think we could also use hashing on MachineFunctions to check for MachineFunctionPasses that modify the MF and then return false.

myhsu added a subscriber: myhsu.Feb 16 2022, 9:21 AM

I've got the feeling that we could do something at the analysis level to make sure we never return true for an analysis.

Maybe, but I thought the legacy pass manager generally did not distinguish analysis passes from non-analysis passes.

maybe we can use PassInfo::isAnalysis()?

I think we could also use hashing on MachineFunctions to check for MachineFunctionPasses that modify the MF and then return false.

I vaguely remember a similar idea was also proposed for the new PassManager, couldn't find it on the mailing list (archive) though

This revision was landed with ongoing or failed builds.Feb 17 2022, 1:32 AM
This revision was automatically updated to reflect the committed changes.