1 //===- SafepointIRVerifier.h - Checks for GC relocation problems *- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines a verifier which is useful for enforcing the relocation
11 // properties required by a relocating GC. Specifically, it looks for uses of
12 // the unrelocated value of pointer SSA values after a possible safepoint. It
13 // attempts to report no false negatives, but may end up reporting false
14 // positives in rare cases (see the note at the top of the corresponding cpp
17 //===----------------------------------------------------------------------===//
19 #ifndef LLVM_IR_SAFEPOINT_IR_VERIFIER
20 #define LLVM_IR_SAFEPOINT_IR_VERIFIER
27 /// Run the safepoint verifier over a single function. Crashes on failure.
28 void verifySafepointIR(Function &F);
30 /// Create an instance of the safepoint verifier pass which can be added to
31 /// a pass pipeline to check for relocation bugs.
32 FunctionPass *createSafepointIRVerifierPass();
35 #endif // LLVM_IR_SAFEPOINT_IR_VERIFIER