[all-commits] [llvm/llvm-project] a812f8: [Target] Add target-independent TargetVerifier dis...

jofrn via All-commits all-commits at lists.llvm.org
Wed Jun 24 17:41:32 PDT 2026


  Branch: refs/heads/users/jofrn/target-verifier
  Home:   https://github.com/llvm/llvm-project
  Commit: a812f8c95fdfb6a7c18f60f0d01acb9c9756d1c0
      https://github.com/llvm/llvm-project/commit/a812f8c95fdfb6a7c18f60f0d01acb9c9756d1c0
  Author: jofrn <jo7frn1 at gmail.com>
  Date:   2026-06-20 (Sat, 20 Jun 2026)

  Changed paths:
    A llvm/include/llvm/Target/TargetVerifier.h
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Target/CMakeLists.txt
    A llvm/lib/Target/TargetVerifier.cpp

  Log Message:
  -----------
  [Target] Add target-independent TargetVerifier dispatcher

Introduce a target-dependent IR verification framework that can be run
from target-independent locations.

TargetVerify is a base class each backend subclasses to check a function
for constructs that are invalid for a particular target. Backends
register a factory keyed by Triple::ArchType via registerTargetVerify(),
typically from their LLVMInitialize<Target>Target().

TargetVerifierPass (registered as "target-verifier") is the dispatcher:
it reads the module triple and, if a verifier is registered for that
architecture, runs the generic IR verifier followed by the target's
TargetVerify. It is a no-op for targets that have not registered a
verifier, so it is safe to schedule from generic, target-independent
pipelines (e.g. `opt -passes=target-verifier`).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list