This is an archive of the discontinued LLVM Phabricator instance.

[CGSCC] Add -abort-on-max-devirt-iterations-reached option
ClosedPublic

Authored by aeubanks on Oct 15 2020, 5:49 PM.

Details

Summary

Aborts if we hit the max devirtualization iteration.
Will be useful for testing that changes to devirtualization don't cause
devirtualization to repeat passes more times than necessary.

Diff Detail

Event Timeline

aeubanks created this revision.Oct 15 2020, 5:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 15 2020, 5:49 PM
aeubanks requested review of this revision.Oct 15 2020, 5:49 PM
rnk accepted this revision.Oct 16 2020, 11:42 AM

Code looks good to me as is.

llvm/include/llvm/Analysis/CGSCCPassManager.h
645

This is unrelated to your change, and I could be wrong here, but this seems like an awful lot of templated code that doesn't depend on PassT or Pass. How much of this can be sunk into a .cpp file, similar to the way you pushed down maxDevitIterationsReached?

719

The above thought was brought to you by considering if this LLVM_DEBUG goo should be pushed down into maxDevirtIterationsReached, but I decided it's probably not worth doing.

This revision is now accepted and ready to land.Oct 16 2020, 11:42 AM
aeubanks added inline comments.Oct 16 2020, 12:33 PM
llvm/include/llvm/Analysis/CGSCCPassManager.h
645

Specifically for DevirtSCCRepeatedPass, I'm planning on removing a bunch of it soon :)
But point taken in general, I'll look around for potential savings.