[PATCH] D111397: RFC: A new way of skipping machine verification after problematic passes

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 8 03:16:49 PDT 2021


foad created this revision.
Herald added subscribers: kerbowa, hiraditya, nhaehnle, jvesely, arsenm, jholewinski.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

TargetPassConfig::addPass took a "bool verifyAfter" argument which let
you skip machine verification after a particular pass. Unfortunately
this was used in generic code in TargetPassConfig itself to skip
verification after a generic pass, only because some previous target-
specific pass damaged the MIR on that specific target. This is bad
because problems in one target cause lack of verification for all
targets.

This patch replaces that mechanism with a new MachineFunction property
called "Verifies" which can be reset by (usually target-specific) passes
that are known to introduce problems. Later passes can set it again if
they are known to clean up the previous problems.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111397

Files:
  llvm/include/llvm/CodeGen/MachineFunction.h
  llvm/include/llvm/CodeGen/TargetPassConfig.h
  llvm/lib/CodeGen/MachineFunction.cpp
  llvm/lib/CodeGen/MachineVerifier.cpp
  llvm/lib/CodeGen/TargetPassConfig.cpp
  llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  llvm/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp
  llvm/lib/Target/AMDGPU/R600TargetMachine.cpp
  llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
  llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
  llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp
  llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
  llvm/lib/Target/MSP430/MSP430TargetMachine.cpp
  llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
  llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
  llvm/lib/Target/XCore/XCoreTargetMachine.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111397.378153.patch
Type: text/x-patch
Size: 17794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211008/6643cb5e/attachment.bin>


More information about the llvm-commits mailing list