Skip to content

[NFC][opt] Rename VerifierKind enums #106789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions llvm/tools/opt/NewPMDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,6 @@ bool llvm::runPassPipeline(
bool ShouldPreserveBitcodeUseListOrder, bool EmitSummaryIndex,
bool EmitModuleHash, bool EnableDebugify, bool VerifyDIPreserve,
bool UnifiedLTO) {
bool VerifyEachPass = VK == VK_VerifyEachPass;

auto FS = vfs::getRealFileSystem();
std::optional<PGOOptions> P;
switch (PGOKindFlag) {
Expand Down Expand Up @@ -410,7 +408,7 @@ bool llvm::runPassPipeline(
PrintPassOpts.Verbose = DebugPM == DebugLogging::Verbose;
PrintPassOpts.SkipAnalyses = DebugPM == DebugLogging::Quiet;
StandardInstrumentations SI(M.getContext(), DebugPM != DebugLogging::None,
VerifyEachPass, PrintPassOpts);
VK == VerifierKind::EachPass, PrintPassOpts);
SI.registerCallbacks(PIC, &MAM);
DebugifyEachInstrumentation Debugify;
DebugifyStatsMap DIStatsMap;
Expand Down Expand Up @@ -483,7 +481,7 @@ bool llvm::runPassPipeline(
}
}

if (VK > VK_NoVerifier)
if (VK != VerifierKind::None)
MPM.addPass(VerifierPass());
if (EnableDebugify)
MPM.addPass(NewPMCheckDebugifyPass(false, "", &DIStatsMap));
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/opt/NewPMDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ enum OutputKind {
OK_OutputBitcode,
OK_OutputThinLTOBitcode,
};
enum VerifierKind { VK_NoVerifier, VK_VerifyOut, VK_VerifyEachPass };
enum class VerifierKind { None, InputOutput, EachPass };
enum PGOKind {
NoPGO,
InstrGen,
Expand Down
6 changes: 3 additions & 3 deletions llvm/tools/opt/optdriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,11 +726,11 @@ extern "C" int optMain(
? OK_OutputAssembly
: (OutputThinLTOBC ? OK_OutputThinLTOBitcode : OK_OutputBitcode);

VerifierKind VK = VK_VerifyOut;
VerifierKind VK = VerifierKind::InputOutput;
if (NoVerify)
VK = VK_NoVerifier;
VK = VerifierKind::None;
else if (VerifyEach)
VK = VK_VerifyEachPass;
VK = VerifierKind::EachPass;

// The user has asked to use the new pass manager and provided a pipeline
// string. Hand off the rest of the functionality to the new code for that
Expand Down
Loading