|
|
|||
File indexing completed on 2026-05-10 08:44:10
0001 //===- SafepointIRVerifier.h - Checks for GC relocation problems *- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 // 0009 // This file defines a verifier which is useful for enforcing the relocation 0010 // properties required by a relocating GC. Specifically, it looks for uses of 0011 // the unrelocated value of pointer SSA values after a possible safepoint. It 0012 // attempts to report no false negatives, but may end up reporting false 0013 // positives in rare cases (see the note at the top of the corresponding cpp 0014 // file.) 0015 // 0016 //===----------------------------------------------------------------------===// 0017 0018 #ifndef LLVM_IR_SAFEPOINTIRVERIFIER_H 0019 #define LLVM_IR_SAFEPOINTIRVERIFIER_H 0020 0021 #include "llvm/IR/PassManager.h" 0022 0023 namespace llvm { 0024 0025 class Function; 0026 class FunctionPass; 0027 0028 /// Run the safepoint verifier over a single function. Crashes on failure. 0029 void verifySafepointIR(Function &F); 0030 0031 /// Create an instance of the safepoint verifier pass which can be added to 0032 /// a pass pipeline to check for relocation bugs. 0033 FunctionPass *createSafepointIRVerifierPass(); 0034 0035 /// Create an instance of the safepoint verifier pass which can be added to 0036 /// a pass pipeline to check for relocation bugs. 0037 class SafepointIRVerifierPass : public PassInfoMixin<SafepointIRVerifierPass> { 0038 0039 public: 0040 explicit SafepointIRVerifierPass() = default; 0041 0042 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); 0043 0044 static bool isRequired() { return true; } 0045 }; 0046 } 0047 0048 #endif // LLVM_IR_SAFEPOINTIRVERIFIER_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|