Home | History | Annotate | Download | only in IR
      1 //===- SafepointIRVerifier.h - Checks for GC relocation problems *- C++ -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 //
     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
     15 // file.)
     16 //
     17 //===----------------------------------------------------------------------===//
     18 
     19 #ifndef LLVM_IR_SAFEPOINT_IR_VERIFIER
     20 #define LLVM_IR_SAFEPOINT_IR_VERIFIER
     21 
     22 namespace llvm {
     23 
     24 class Function;
     25 class FunctionPass;
     26 
     27 /// Run the safepoint verifier over a single function.  Crashes on failure.
     28 void verifySafepointIR(Function &F);
     29 
     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();
     33 }
     34 
     35 #endif // LLVM_IR_SAFEPOINT_IR_VERIFIER
     36