LLVM  13.0.0git
SafepointIRVerifier.h
Go to the documentation of this file.
1 //===- SafepointIRVerifier.h - Checks for GC relocation problems *- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines a verifier which is useful for enforcing the relocation
10 // properties required by a relocating GC. Specifically, it looks for uses of
11 // the unrelocated value of pointer SSA values after a possible safepoint. It
12 // attempts to report no false negatives, but may end up reporting false
13 // positives in rare cases (see the note at the top of the corresponding cpp
14 // file.)
15 //
16 //===----------------------------------------------------------------------===//
17 
18 #ifndef LLVM_IR_SAFEPOINTIRVERIFIER_H
19 #define LLVM_IR_SAFEPOINTIRVERIFIER_H
20 
21 #include "llvm/IR/PassManager.h"
22 
23 namespace llvm {
24 
25 class Function;
26 class FunctionPass;
27 
28 /// Run the safepoint verifier over a single function. Crashes on failure.
29 void verifySafepointIR(Function &F);
30 
31 /// Create an instance of the safepoint verifier pass which can be added to
32 /// a pass pipeline to check for relocation bugs.
33 FunctionPass *createSafepointIRVerifierPass();
34 
35 /// Create an instance of the safepoint verifier pass which can be added to
36 /// a pass pipeline to check for relocation bugs.
37 class SafepointIRVerifierPass : public PassInfoMixin<SafepointIRVerifierPass> {
38 
39 public:
41 
43 };
44 }
45 
46 #endif // LLVM_IR_SAFEPOINTIRVERIFIER_H
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:155
llvm::verifySafepointIR
void verifySafepointIR(Function &F)
Run the safepoint verifier over a single function. Crashes on failure.
Definition: SafepointIRVerifier.cpp:238
llvm
Definition: AllocatorList.h:23
llvm::PassInfoMixin
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:374
llvm::Function
Definition: Function.h:61
llvm::SafepointIRVerifierPass
Create an instance of the safepoint verifier pass which can be added to a pass pipeline to check for ...
Definition: SafepointIRVerifier.h:37
F
#define F(x, y, z)
Definition: MD5.cpp:56
llvm::createSafepointIRVerifierPass
FunctionPass * createSafepointIRVerifierPass()
Create an instance of the safepoint verifier pass which can be added to a pass pipeline to check for ...
Definition: SafepointIRVerifier.cpp:245
PassManager.h
llvm::SafepointIRVerifierPass::run
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Definition: SafepointIRVerifier.cpp:203
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition: InstructionSimplify.h:44
llvm::SafepointIRVerifierPass::SafepointIRVerifierPass
SafepointIRVerifierPass()
Definition: SafepointIRVerifier.h:40
llvm::codeview::PublicSymFlags::Function
@ Function