Skip to content

Commit 31eaa4e

Browse files
authored
Revert "[llc] Provide opt like verifier options (#106665)"
This reverts commit 69657eb.
1 parent 7732d8e commit 31eaa4e

27 files changed

+30
-48
lines changed

llvm/include/llvm/Passes/CodeGenPassBuilder.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,6 @@ Error CodeGenPassBuilder<Derived, TargetMachineT>::buildPipeline(
550550
if (auto Err = derived().addMachinePasses(addPass))
551551
return std::move(Err);
552552

553-
if (!Opt.DisableVerify)
554-
addPass(MachineVerifierPass());
555-
556553
if (PrintAsm) {
557554
derived().addAsmPrinter(
558555
addPass, [this, &Out, DwoOut, FileType](MCContext &Ctx) {

llvm/test/CodeGen/AArch64/PHIElimination-crash.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llc -mtriple=aarch64-linux-gnu -verify-machineinstrs -o /dev/null %s \
22
# RUN: -run-pass=livevars,phi-node-elimination,twoaddressinstruction \
33
# RUN: -no-phi-elim-live-out-early-exit=1 -phi-elim-split-all-critical-edges=1
4-
# RUN: llc -mtriple=aarch64-linux-gnu -verify-each -o /dev/null %s \
4+
# RUN: llc -mtriple=aarch64-linux-gnu -verify-machineinstrs -o /dev/null %s \
55
# RUN: --passes='require<live-vars>,phi-node-elimination,two-address-instruction' \
66
# RUN: -no-phi-elim-live-out-early-exit=1 -phi-elim-split-all-critical-edges=1
77

llvm/test/CodeGen/AArch64/PHIElimination-debugloc.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RUN: -run-pass=livevars,phi-node-elimination,twoaddressinstruction \
33
# RUN: -no-phi-elim-live-out-early-exit=1 -phi-elim-split-all-critical-edges=1 \
44
# RUN: | FileCheck %s
5-
# RUN: llc -mtriple=aarch64-linux-gnu -verify-each -o - %s \
5+
# RUN: llc -mtriple=aarch64-linux-gnu -verify-machineinstrs -o - %s \
66
# RUN: --passes='require<live-vars>,phi-node-elimination,two-address-instruction' \
77
# RUN: -no-phi-elim-live-out-early-exit=1 -phi-elim-split-all-critical-edges=1 \
88
# RUN: | FileCheck %s

llvm/test/CodeGen/AArch64/statepoint-twoaddr.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
22
# RUN: llc -mtriple=aarch64-unknown-linux -run-pass=twoaddressinstruction -verify-machineinstrs %s -o - | FileCheck %s
3-
# RUN: llc -mtriple=aarch64-unknown-linux --passes=two-address-instruction -verify-each %s -o - | FileCheck %s
3+
# RUN: llc -mtriple=aarch64-unknown-linux --passes=two-address-instruction %s -o - | FileCheck %s
44
# REQUIRES: aarch64-registered-target
55

66
# Verify that the register class is correctly constrained after the twoaddress replacement

llvm/test/CodeGen/AMDGPU/GlobalISel/twoaddr-extract-dyn-v7f64.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
22
# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -early-live-intervals -run-pass=liveintervals -run-pass=twoaddressinstruction -verify-machineinstrs -o - %s | FileCheck %s
3-
# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -passes='require<live-intervals>,two-address-instruction' -verify-each -o - %s | FileCheck %s
3+
# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -passes='require<live-intervals>,two-address-instruction' -o - %s | FileCheck %s
44

55
---
66
name: dyn_extract_v7f64_v_v

llvm/test/CodeGen/AMDGPU/early-lis-two-address-partial-def.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
22
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a -run-pass=liveintervals -run-pass=twoaddressinstruction -verify-machineinstrs -o - %s | FileCheck --check-prefix=GFX90A %s
3-
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a --passes='require<live-intervals>,two-address-instruction' -verify-each -o - %s | FileCheck --check-prefix=GFX90A %s
3+
# RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a --passes='require<live-intervals>,two-address-instruction' -o - %s | FileCheck --check-prefix=GFX90A %s
44

55
---
66
name: aligned_partial_vgpr_64

llvm/test/CodeGen/AMDGPU/gfx10-twoaddr-fma.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck --check-prefixes=GFX10 %s
2-
# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 %s --passes=two-address-instruction -verify-each -o - | FileCheck --check-prefixes=GFX10 %s
2+
# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 %s --passes=two-address-instruction -o - | FileCheck --check-prefixes=GFX10 %s
33

44
# GFX10-LABEL: name: test_fmamk_reg_imm_f16
55
# GFX10: %2:vgpr_32 = IMPLICIT_DEF

llvm/test/CodeGen/AMDGPU/gfx11-twoaddr-fma.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
22
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck --check-prefixes=GFX11 %s
3-
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 %s --passes=two-address-instruction -verify-each -o - | FileCheck --check-prefixes=GFX11 %s
3+
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 %s --passes=two-address-instruction -verify-machineinstrs -o - | FileCheck --check-prefixes=GFX11 %s
44

55
---
66
name: test_fmamk_reg_imm_f16

llvm/test/CodeGen/AMDGPU/phi-elimination-end-cf.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llc -mtriple amdgcn -run-pass livevars -run-pass phi-node-elimination -verify-machineinstrs -o - %s | FileCheck %s
2-
# RUN: llc -mtriple amdgcn --passes='require<live-vars>,phi-node-elimination' -verify-each -o - %s | FileCheck %s
2+
# RUN: llc -mtriple amdgcn --passes='require<live-vars>,phi-node-elimination' -o - %s | FileCheck %s
33

44
# CHECK-LABEL: phi-cf-test
55
# CHECK: bb.0:

llvm/test/CodeGen/AMDGPU/split-mbb-lis-subrange.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
22
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -verify-machineinstrs -run-pass liveintervals,phi-node-elimination -o - %s | FileCheck -check-prefixes=GCN %s
3-
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 --passes='require<live-intervals>,phi-node-elimination' -verify-each -o - %s | FileCheck -check-prefixes=GCN %s
3+
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 --passes='require<live-intervals>,phi-node-elimination' -o - %s | FileCheck -check-prefixes=GCN %s
44

55
# This checks liveintervals pass verification and phi-node-elimination correctly preserves them.
66

llvm/test/CodeGen/AMDGPU/stale-livevar-in-twoaddr-pass.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 -run-pass=livevars,phi-node-elimination,twoaddressinstruction -verify-machineinstrs -o - %s | FileCheck %s
2-
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 --passes='require<live-vars>,phi-node-elimination,two-address-instruction' -verify-each -o - %s | FileCheck %s
2+
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 --passes='require<live-vars>,phi-node-elimination,two-address-instruction' -verify-machineinstrs -o - %s | FileCheck %s
33
# This used to fail under ASAN enabled build because we didn't update LiveVariables in SIInstrInfo::convertToThreeAddress()
44
# CHECK: _amdgpu_ps_main
55

llvm/test/CodeGen/AMDGPU/twoaddr-fma-f64.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llc -mtriple=amdgcn -mcpu=gfx90a %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck -check-prefix=GCN %s
2-
# RUN: llc -mtriple=amdgcn -mcpu=gfx90a %s --passes=two-address-instruction -verify-each -o - | FileCheck -check-prefix=GCN %s
2+
# RUN: llc -mtriple=amdgcn -mcpu=gfx90a %s --passes=two-address-instruction -o - | FileCheck -check-prefix=GCN %s
33

44
# GCN-LABEL: name: test_fmamk_reg_imm_f64
55
# GCN: V_FMA_F64_e64 0, killed %0, 0, %2, 0, killed %1, 0, 0, implicit $mode, implicit $exec

llvm/test/CodeGen/AMDGPU/twoaddr-fma.mir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck --check-prefixes=GCN %s
22
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck --check-prefixes=GCN %s
3-
# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 %s --passes=two-address-instruction -verify-each -o - | FileCheck --check-prefixes=GCN %s
4-
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 %s --passes=two-address-instruction -verify-each -o - | FileCheck --check-prefixes=GCN %s
3+
# RUN: llc -mtriple=amdgcn -mcpu=gfx1010 %s --passes=two-address-instruction -o - | FileCheck --check-prefixes=GCN %s
4+
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 %s --passes=two-address-instruction -o - | FileCheck --check-prefixes=GCN %s
55

66
# GCN-LABEL: name: test_fmamk_reg_imm_f32
77
# GCN: %2:vgpr_32 = IMPLICIT_DEF

llvm/test/CodeGen/AMDGPU/twoaddr-mad.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck -check-prefix=GCN %s
2-
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 %s --passes=two-address-instruction -verify-each -o - | FileCheck -check-prefix=GCN %s
2+
# RUN: llc -mtriple=amdgcn -mcpu=gfx900 %s --passes=two-address-instruction -o - | FileCheck -check-prefix=GCN %s
33

44
# GCN-LABEL: name: test_madmk_reg_imm_f32
55
# GCN: V_MADMK_F32 killed %0.sub0, 1078523331, killed %1, implicit $mode, implicit $exec

llvm/test/CodeGen/AMDGPU/twoaddr-wmma.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 %s -run-pass twoaddressinstruction -verify-machineinstrs -o - | FileCheck -check-prefix=GCN %s
2-
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 %s --passes=two-address-instruction -verify-each -o - | FileCheck -check-prefix=GCN %s
2+
# RUN: llc -mtriple=amdgcn -mcpu=gfx1100 %s --passes=two-address-instruction -o - | FileCheck -check-prefix=GCN %s
33

44
# GCN-LABEL: name: test_v_wmma_f32_16x16x16_f16_twoaddr_w32
55
# GCN: early-clobber %2:vreg_256 = V_WMMA_F32_16X16X16_F16_threeaddr_w32 8, killed %1, 8, killed %1, 8, %0, 0, 0, implicit $exec

llvm/test/CodeGen/Hexagon/two-addr-tied-subregs.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llc -march hexagon -run-pass livevars -run-pass twoaddressinstruction -verify-machineinstrs -o - %s | FileCheck %s
2-
# RUN: llc -march hexagon --passes='require<live-vars>,two-address-instruction' -verify-each -o - %s | FileCheck %s
2+
# RUN: llc -march hexagon --passes='require<live-vars>,two-address-instruction' -o - %s | FileCheck %s
33

44

55
###############################################################################

llvm/test/CodeGen/PowerPC/2013-07-01-PHIElimBug.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llc -mtriple powerpc64-unknown-linux-gnu -run-pass livevars -run-pass phi-node-elimination -verify-machineinstrs -o - %s | FileCheck %s
2-
# RUN: llc -mtriple powerpc64-unknown-linux-gnu --passes='require<live-vars>,phi-node-elimination' -verify-each -o - %s | FileCheck %s
2+
# RUN: llc -mtriple powerpc64-unknown-linux-gnu --passes='require<live-vars>,phi-node-elimination' -o - %s | FileCheck %s
33

44
# This test case was originally known as
55
# test/CodeGen/PowerPC/2013-07-01-PHIElimBug.ll

llvm/test/CodeGen/PowerPC/livevars-crash1.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RUN: -run-pass=livevars,phi-node-elimination -verify-machineinstrs | \
33
# RUN: FileCheck %s
44
# RUN: llc -mtriple powerpc64le-unknown-linux-gnu %s -o - 2>&1 \
5-
# RUN: --passes='require<live-vars>,phi-node-elimination' -verify-each | \
5+
# RUN: --passes='require<live-vars>,phi-node-elimination' | \
66
# RUN: FileCheck %s
77

88
--- |

llvm/test/CodeGen/PowerPC/livevars-crash2.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# RUN: -run-pass=livevars,phi-node-elimination -verify-machineinstrs | \
33
# RUN: FileCheck %s
44
# RUN: llc -mtriple powerpc64le-unknown-linux-gnu %s -o - 2>&1 \
5-
# RUN: --passes='require<live-vars>,phi-node-elimination' -verify-each | \
5+
# RUN: --passes='require<live-vars>,phi-node-elimination' | \
66
# RUN: FileCheck %s
77

88
--- |

llvm/test/CodeGen/X86/distancemap.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
22
# RUN: llc %s -o - -mtriple=x86_64-unknown-linux -run-pass=twoaddressinstruction -verify-machineinstrs | FileCheck %s
3-
# RUN: llc %s -o - -mtriple=x86_64-unknown-linux --passes=two-address-instruction -verify-each | FileCheck %s
3+
# RUN: llc %s -o - -mtriple=x86_64-unknown-linux --passes=two-address-instruction | FileCheck %s
44

55
# In TwoAddressInstructionPass, new instructions should be added to DistanceMap.
66
# In this case, function convertInstTo3Addr is called on the first ADD

llvm/test/CodeGen/X86/phielim-undef.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
22
# RUN: llc -mtriple=x86_64-- -verify-machineinstrs -o - %s -run-pass=livevars,phi-node-elimination,twoaddressinstruction | FileCheck %s
3-
# RUN: llc -mtriple=x86_64-- -verify-machineinstrs -o - %s --passes='require<live-vars>,phi-node-elimination,two-address-instruction' -verify-each | FileCheck %s
3+
# RUN: llc -mtriple=x86_64-- -verify-machineinstrs -o - %s --passes='require<live-vars>,phi-node-elimination,two-address-instruction' | FileCheck %s
44

55
--- |
66
@b114 = external global i16, align 1

llvm/test/CodeGen/X86/twoaddr-mul2.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
22
# RUN: llc -mtriple=x86_64-unknown -mcpu=haswell -run-pass=twoaddressinstruction -verify-machineinstrs %s -o - | FileCheck %s
3-
# RUN: llc -mtriple=x86_64-unknown -mcpu=haswell --passes=two-address-instruction -verify-each %s -o - | FileCheck %s
3+
# RUN: llc -mtriple=x86_64-unknown -mcpu=haswell --passes=two-address-instruction -verify-machineinstrs %s -o - | FileCheck %s
44

55
# Check that we don't have any uses of [[COPY]] after it is killed.
66
---

llvm/test/tools/llc/new-pm/pipeline.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llc -mtriple=x86_64-pc-linux-gnu -x mir -passes=no-op-machine-function --print-pipeline-passes -filetype=null < %s | FileCheck %s --match-full-lines
22
# RUN: llc -mtriple=x86_64-pc-linux-gnu -x mir -passes='require<machine-dom-tree>,print<machine-dom-tree>' -print-pipeline-passes < %s | FileCheck --check-prefix=ANALYSIS %s
33

4-
# CHECK: function(machine-function(no-op-machine-function)),PrintMIRPreparePass,function(machine-function(verify,print))
4+
# CHECK: function(machine-function(no-op-machine-function)),PrintMIRPreparePass,function(machine-function(print))
55

66
# ANALYSIS: require<machine-dom-tree>,print<machine-dom-tree>
77

llvm/test/tools/llc/new-pm/verify.mir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RUN: not --crash llc -mtriple=x86_64-pc-linux-gnu -debug-pass-manager -passes='module(function(machine-function(trigger-verifier-error)))' -verify-each -filetype=null %s 2>&1 | FileCheck %s
1+
# RUN: not --crash llc -mtriple=x86_64-pc-linux-gnu -debug-pass-manager -passes='module(function(machine-function(trigger-verifier-error)))' -filetype=null %s 2>&1 | FileCheck %s
22

33
# CHECK: Verifying machine function f
44
# CHECK: Broken machine function found after pass "TriggerVerifierErrorPass"

llvm/tools/llc/NewPMDriver.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818
#include "llvm/CodeGen/CommandFlags.h"
1919
#include "llvm/CodeGen/MIRParser/MIRParser.h"
2020
#include "llvm/CodeGen/MIRPrinter.h"
21-
#include "llvm/CodeGen/MachineFunctionAnalysis.h"
2221
#include "llvm/CodeGen/MachineModuleInfo.h"
2322
#include "llvm/CodeGen/MachinePassManager.h"
24-
#include "llvm/CodeGen/MachineVerifier.h"
2523
#include "llvm/CodeGen/TargetPassConfig.h"
2624
#include "llvm/IR/DiagnosticInfo.h"
2725
#include "llvm/IR/DiagnosticPrinter.h"
@@ -31,6 +29,7 @@
3129
#include "llvm/IR/PassManager.h"
3230
#include "llvm/IR/Verifier.h"
3331
#include "llvm/IRReader/IRReader.h"
32+
#include "llvm/Passes/CodeGenPassBuilder.h" // TODO: Include pass headers properly.
3433
#include "llvm/Passes/PassBuilder.h"
3534
#include "llvm/Passes/StandardInstrumentations.h"
3635
#include "llvm/Support/CommandLine.h"
@@ -89,7 +88,7 @@ int llvm::compileModuleWithNewPM(
8988
StringRef Arg0, std::unique_ptr<Module> M, std::unique_ptr<MIRParser> MIR,
9089
std::unique_ptr<TargetMachine> Target, std::unique_ptr<ToolOutputFile> Out,
9190
std::unique_ptr<ToolOutputFile> DwoOut, LLVMContext &Context,
92-
const TargetLibraryInfoImpl &TLII, VerifierKind VK, StringRef PassPipeline,
91+
const TargetLibraryInfoImpl &TLII, bool NoVerify, StringRef PassPipeline,
9392
CodeGenFileType FileType) {
9493

9594
if (!PassPipeline.empty() && TargetPassConfig::hasLimitedCodeGenPipeline()) {
@@ -105,15 +104,14 @@ int llvm::compileModuleWithNewPM(
105104

106105
// Fetch options from TargetPassConfig
107106
CGPassBuilderOption Opt = getCGPassBuilderOption();
108-
Opt.DisableVerify = VK != VerifierKind::InputOutput;
107+
Opt.DisableVerify = NoVerify;
109108
Opt.DebugPM = DebugPM;
110109
Opt.RegAlloc = RegAlloc;
111110

112111
MachineModuleInfo MMI(&LLVMTM);
113112

114113
PassInstrumentationCallbacks PIC;
115-
StandardInstrumentations SI(Context, Opt.DebugPM,
116-
VK == VerifierKind::EachPass);
114+
StandardInstrumentations SI(Context, Opt.DebugPM, !NoVerify);
117115
registerCodeGenCallback(PIC, LLVMTM);
118116

119117
MachineFunctionAnalysisManager MFAM;
@@ -149,8 +147,6 @@ int llvm::compileModuleWithNewPM(
149147
ExitOnErr(PB.parsePassPipeline(MPM, PassPipeline));
150148
MPM.addPass(PrintMIRPreparePass(*OS));
151149
MachineFunctionPassManager MFPM;
152-
if (VK == VerifierKind::InputOutput)
153-
MFPM.addPass(MachineVerifierPass());
154150
MFPM.addPass(PrintMIRPass(*OS));
155151
FPM.addPass(createFunctionToMachineFunctionPassAdaptor(std::move(MFPM)));
156152
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));

llvm/tools/llc/NewPMDriver.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ class ToolOutputFile;
3232
class LLVMContext;
3333
class MIRParser;
3434

35-
enum class VerifierKind { None, InputOutput, EachPass };
36-
3735
struct LLCDiagnosticHandler : public DiagnosticHandler {
3836
bool handleDiagnostics(const DiagnosticInfo &DI) override;
3937
};
@@ -44,7 +42,7 @@ int compileModuleWithNewPM(StringRef Arg0, std::unique_ptr<Module> M,
4442
std::unique_ptr<ToolOutputFile> Out,
4543
std::unique_ptr<ToolOutputFile> DwoOut,
4644
LLVMContext &Context,
47-
const TargetLibraryInfoImpl &TLII, VerifierKind VK,
45+
const TargetLibraryInfoImpl &TLII, bool NoVerify,
4846
StringRef PassPipeline, CodeGenFileType FileType);
4947
} // namespace llvm
5048

llvm/tools/llc/llc.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ static cl::opt<std::string> SplitDwarfFile(
130130
static cl::opt<bool> NoVerify("disable-verify", cl::Hidden,
131131
cl::desc("Do not verify input module"));
132132

133-
static cl::opt<bool> VerifyEach("verify-each",
134-
cl::desc("Verify after each transform"));
135-
136133
static cl::opt<bool>
137134
DisableSimplifyLibCalls("disable-simplify-libcalls",
138135
cl::desc("Disable simplify-libcalls"));
@@ -650,16 +647,10 @@ static int compileModule(char **argv, LLVMContext &Context) {
650647
WithColor::warning(errs(), argv[0])
651648
<< ": warning: ignoring -mc-relax-all because filetype != obj";
652649

653-
VerifierKind VK = VerifierKind::InputOutput;
654-
if (NoVerify)
655-
VK = VerifierKind::None;
656-
else if (VerifyEach)
657-
VK = VerifierKind::EachPass;
658-
659650
if (EnableNewPassManager || !PassPipeline.empty()) {
660651
return compileModuleWithNewPM(argv[0], std::move(M), std::move(MIR),
661652
std::move(Target), std::move(Out),
662-
std::move(DwoOut), Context, TLII, VK,
653+
std::move(DwoOut), Context, TLII, NoVerify,
663654
PassPipeline, codegen::getFileType());
664655
}
665656

0 commit comments

Comments
 (0)