This is an archive of the discontinued LLVM Phabricator instance.

[test][NewGVN] Use '-passes=newgvn' instead of 'basic-aa -newgvn'
ClosedPublic

Authored by bjope on Jan 27 2022, 2:53 AM.

Details

Summary

This updates NewGVN test cases the were running

"opt -basic-aa -newgvn ..."

to run

"opt -passes=newgvn ..."

instead.

The pipeline will be more similar to what we used to have with
legacy PM by doing it this way. The compatility mode that we've
been using for awhile during transition from legacy PM to new PM,
i.e. using the legacy syntax together with new PM, has resulted in
a pipeline such as

-passes='function(require<basic-aa>),function(newgvn)'

but running the analysis in a separate function pass manager seem
overly complicated for these tests.

Another difference is that we will get the default aa-pipeline instead
of only running basic-aa. That might be a bit questioned (given that
the tests originally specified basic-aa). The output is however
identical for all the test cases modified here regardless of using
basic-aa or the default aa-pipeline.

This is also another small step towards removal of the support for
using the legacy PM syntax in opt.

Diff Detail

Event Timeline

bjope requested review of this revision.Jan 27 2022, 2:53 AM
bjope created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2022, 2:53 AM
fhahn accepted this revision.Jan 27 2022, 2:55 AM
fhahn added a subscriber: fhahn.

LGTM, thanks!

This revision is now accepted and ready to land.Jan 27 2022, 2:55 AM
nikic added a subscriber: nikic.Jan 27 2022, 2:55 AM

Can you please omit -aa-pipeline entirely where it makes no difference to test output? Especially for basic-aa, it should not be necessary to explicitly specify it.

bjope added a comment.Jan 27 2022, 3:10 AM

Can you please omit -aa-pipeline entirely where it makes no difference to test output? Especially for basic-aa, it should not be necessary to explicitly specify it.

I was afraid that the reason for having explicitly added -basic-aa in the original test case might have indicated that basic-aa was needed to expose the bug etc.
But ofcourse, since with legacy PM "opt -basic-aa -newgvn" and "opt -newgvn" would give the same result one might question why these tests has been explicitly mentioning -basic-aa from the start.

So in the end I guess this patch really isn't much different from D118341 were I'm handling tests that did not specify -basic-aa. I'll look into omitting -aa-pipeline in these tests as well.

bjope updated this revision to Diff 403610.Jan 27 2022, 5:01 AM

Updated based on the suggestion to drop -aa-pipeline=basic-aa in test cases for which the output would be the same when using the default aa-pipeline (that was the case for all but one file, so that one was left out from this patch).

bjope requested review of this revision.Jan 27 2022, 5:06 AM
bjope retitled this revision from [test][NewGVN] Use '-aa-pipeline=basic-aa -passes=newgvn' instead of '-basic-aa -newgvn' to [test][NewGVN] Use '-passes=newgvn' instead of 'basic-aa -newgvn'.
bjope edited the summary of this revision. (Show Details)
aeubanks accepted this revision.Jan 27 2022, 8:30 AM
This revision is now accepted and ready to land.Jan 27 2022, 8:30 AM
This revision was landed with ongoing or failed builds.Jan 28 2022, 4:58 AM
This revision was automatically updated to reflect the committed changes.