This is an archive of the discontinued LLVM Phabricator instance.

[NFC][llvm-reduce] Cleanup types
ClosedPublic

Authored by aeubanks on Oct 5 2021, 12:11 AM.

Details

Summary

Use Module& wherever possible.
Since every reduction immediately turns Chunks into an Oracle, directly pass Oracle instead.

Diff Detail

Event Timeline

aeubanks created this revision.Oct 5 2021, 12:11 AM
aeubanks requested review of this revision.Oct 5 2021, 12:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2021, 12:11 AM

std::vector<Chunk> -> Oracle: LGTM

Module* -> Module&: It's a code style question and I prefer using Module* (or wrapped in a smart pointer) consistently. I don't like that sometimes it's M. but sometimes M->. It also makes "Has TestRunner been assigned a Program yet?" undefined behaviour.

There are some comment reflows. I assume this is due to adding a new scope, clang-format, removing the scope, clang-format again. Could you clean that up?

aeubanks updated this revision to Diff 377920.Oct 7 2021, 11:19 AM

undo comment reformatting
we should never have a null Module, added asserts for that and changed the constructor to force an initial Module
I prefer Module& to show that it can never be null

hans accepted this revision.Oct 8 2021, 1:52 AM
This revision is now accepted and ready to land.Oct 8 2021, 1:52 AM
This revision was landed with ongoing or failed builds.Oct 10 2021, 6:12 PM
This revision was automatically updated to reflect the committed changes.