LLVM
8.0.1
|
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Value.h"
#include "llvm/IR/SafepointIRVerifier.h"
#include "llvm/IR/Statepoint.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Classes | |
struct | BasicBlockState |
State we compute and track per basic block. More... | |
Macros | |
#define | DEBUG_TYPE "safepoint-ir-verifier" |
Typedefs | |
using | AvailableValueSet = DenseSet< const Value * > |
The verifier algorithm is phrased in terms of availability. More... | |
Enumerations | |
enum | BaseType { NonConstant = 1, ExclusivelyNull, ExclusivelySomeConstant } |
A given derived pointer can have multiple base pointers through phi/selects. More... | |
Functions | |
static void | Verify (const Function &F, const DominatorTree &DT, const CFGDeadness &CD) |
INITIALIZE_PASS_BEGIN (SafepointIRVerifier, "verify-safepoint-ir", "Safepoint IR Verifier", false, false) INITIALIZE_PASS_END(SafepointIRVerifier | |
verify safepoint Safepoint IR static false bool | isGCPointerType (Type *T) |
static bool | containsGCPtrType (Type *Ty) |
template<typename IteratorTy > | |
static void | PrintValueSet (raw_ostream &OS, IteratorTy Begin, IteratorTy End) |
static enum BaseType | getBaseType (const Value *Val) |
Return the baseType for Val which states whether Val is exclusively derived from constant/null, or not exclusively derived from constant. More... | |
static bool | isNotExclusivelyConstantDerived (const Value *V) |
Variables | |
static cl::opt< bool > | PrintOnly ("safepoint-ir-verifier-print-only", cl::init(false)) |
This option is used for writing test cases. More... | |
verify safepoint | ir |
verify safepoint Safepoint IR | Verifier |
verify safepoint Safepoint IR | false |
#define DEBUG_TYPE "safepoint-ir-verifier" |
Definition at line 52 of file SafepointIRVerifier.cpp.
using AvailableValueSet = DenseSet<const Value *> |
The verifier algorithm is phrased in terms of availability.
The set of values "available" at a given point in the control flow graph is the set of correctly relocated value at that point, and is a subset of the set of definitions dominating that point.
Definition at line 280 of file SafepointIRVerifier.cpp.
enum BaseType |
A given derived pointer can have multiple base pointers through phi/selects.
This type indicates when the base pointer is exclusively constant (ExclusivelySomeConstant), and if that constant is proven to be exclusively null, we record that as ExclusivelyNull. In all other cases, the BaseType is NonConstant.
Enumerator | |
---|---|
NonConstant | |
ExclusivelyNull | |
ExclusivelySomeConstant |
Definition at line 304 of file SafepointIRVerifier.cpp.
Definition at line 252 of file SafepointIRVerifier.cpp.
References llvm::any_of(), isGCPointerType(), and llvm::ARM_MB::ST.
Return the baseType for Val which states whether Val is exclusively derived from constant/null, or not exclusively derived from constant.
Val is exclusively derived off a constant base when all operands of phi and selects are derived off a constant base.
Definition at line 316 of file SafepointIRVerifier.cpp.
References llvm::SmallVectorBase::empty(), ExclusivelyNull, ExclusivelySomeConstant, GEP, llvm::Constant::getNullValue(), llvm::Value::getType(), llvm::PHINode::incoming_values(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), NonConstant, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T >::push_back(), and SI.
Referenced by dwarfCCToCodeView(), llvm::DwarfUnit::getOrCreateTypeDIE(), llvm::DbgVariable::getType(), llvm::object::COFFSymbolRef::isFunctionDefinition(), and isNotExclusivelyConstantDerived().
INITIALIZE_PASS_BEGIN | ( | SafepointIRVerifier | , |
"verify-safepoint-ir" | , | ||
"Safepoint IR Verifier" | , | ||
false | , | ||
false | |||
) |
Referenced by llvm::createSafepointIRVerifierPass().
Definition at line 243 of file SafepointIRVerifier.cpp.
Referenced by containsGCPtrType().
Definition at line 370 of file SafepointIRVerifier.cpp.
References BasicBlockState::AvailableIn, BasicBlockState::Cleared, BasicBlockState::Contribution, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::count(), llvm::SetVector< T, Vector, Set >::empty(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::end(), F(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::find(), getBaseType(), I, llvm::SetVector< T, Vector, Set >::insert(), NonConstant, llvm::SetVector< T, Vector, Set >::pop_back_val(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::size(), Verifier, and llvm::verifyFunction().
|
static |
Definition at line 266 of file SafepointIRVerifier.cpp.
|
static |
Definition at line 873 of file SafepointIRVerifier.cpp.
References llvm::dbgs(), llvm::Value::getName(), LLVM_DEBUG, PrintOnly, Verifier, and llvm::verifyFunction().
Definition at line 240 of file SafepointIRVerifier.cpp.
verify safepoint ir |
Definition at line 240 of file SafepointIRVerifier.cpp.
This option is used for writing test cases.
Instead of crashing the program when verification fails, report a message to the console (for FileCheck usage) and continue execution as if nothing happened.
Referenced by Verify().
Definition at line 240 of file SafepointIRVerifier.cpp.
Referenced by llvm::VPlanHCFGBuilder::buildHierarchicalCFG(), llvm::VerifierSupport::DebugInfoCheckFailed(), llvm::AMDGPUTargetAsmStreamer::EmitHSAMetadata(), llvm::AMDGPUTargetELFStreamer::EmitHSAMetadata(), getOffsetFromIndices(), isNotExclusivelyConstantDerived(), llvm::IRTranslator::runOnMachineFunction(), Verify(), llvm::verifyFunction(), and llvm::verifyModule().