reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Derived Classes

include/llvm/IR/Metadata.h
  402 class ConstantAsMetadata : public ValueAsMetadata {
  426 class LocalAsMetadata : public ValueAsMetadata {

Declarations

include/llvm/IR/Metadata.def
   76 HANDLE_METADATA_BRANCH(ValueAsMetadata)

References

include/llvm/IR/Metadata.h
  358   static ValueAsMetadata *get(Value *V);
  368   static ValueAsMetadata *getIfExists(Value *V);
  402 class ConstantAsMetadata : public ValueAsMetadata {
  410     return ValueAsMetadata::getConstant(C);
  414     return ValueAsMetadata::getConstantIfExists(C);
  426 class LocalAsMetadata : public ValueAsMetadata {
  436     return ValueAsMetadata::getLocal(Local);
  440     return ValueAsMetadata::getLocalIfExists(Local);
include/llvm/IR/TrackingMDRef.h
  111   explicit TypedTrackingMDRef(T *MD) : Ref(static_cast<Metadata *>(MD)) {}
  126   T *get() const { return (T *)Ref.get(); }
  127   operator T *() const { return get(); }
  128   T *operator->() const { return get(); }
  129   T &operator*() const { return *get(); }
  135   void reset(T *MD) { Ref.reset(static_cast<Metadata *>(MD)); }
  142 using TrackingValueAsMetadataRef = TypedTrackingMDRef<ValueAsMetadata>;
include/llvm/Support/Casting.h
   57   static inline bool doit(const From &Val) {
   58     return To::classof(&Val);
   92     return isa_impl<To, From>::doit(*Val);
  104   static inline bool doit(const From *Val) {
  106     return isa_impl<To, From>::doit(*Val);
  106     return isa_impl<To, From>::doit(*Val);
  122     return isa_impl_wrap<To, SimpleFrom,
  132     return isa_impl_cl<To,FromTy>::doit(Val);
  142   return isa_impl_wrap<X, const Y,
  172   using ret_type = To *;       // Pointer arg case, return Ty*
  176   using ret_type = const To *; // Constant pointer arg case, return const Ty*
  198   using ret_type = typename cast_retty<To, SimpleFrom>::ret_type;
  204   using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  218   static typename cast_retty<To, From>::ret_type doit(From &Val) {
  219     return cast_convert_val<To, SimpleFrom,
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  228     typename cast_retty<To, FromTy>::ret_type Res2
  248                                typename cast_retty<X, const Y>::ret_type>::type
  252       X, const Y, typename simplify_type<const Y>::SimpleType>::doit(Val);
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  265   return cast_convert_val<X, Y*,
  265   return cast_convert_val<X, Y*,
  266                           typename simplify_type<Y*>::SimpleType>::doit(Val);
  305 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  306 cast_or_null(Y *Val) {
  331                             typename cast_retty<X, const Y>::ret_type>::type
  333   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  333   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  337 LLVM_NODISCARD inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  352                             typename cast_retty<X, const Y>::ret_type>::type
  354   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
  354   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
  360                             typename cast_retty<X, Y>::ret_type>::type
lib/AsmParser/LLParser.cpp
 5079   MD = ValueAsMetadata::get(V);
lib/Bitcode/Reader/MetadataLoader.cpp
 1178         auto *MD =
 1179             ValueAsMetadata::get(ValueList.getValueFwdRef(Record[i + 1], Ty));
 1199         ValueAsMetadata::get(ValueList.getValueFwdRef(Record[1], Ty)),
lib/Bitcode/Writer/BitcodeWriter.cpp
  287   void writeValueAsMetadata(const ValueAsMetadata *MD,
 1421     const ValueAsMetadata *MD, SmallVectorImpl<uint64_t> &Record) {
 2034     writeValueAsMetadata(cast<ValueAsMetadata>(MD), Record);
lib/CodeGen/CodeGenPrepare.cpp
 2558         auto *MV = MetadataAsValue::get(Ctx, ValueAsMetadata::get(Inst));
lib/CodeGen/StackColoring.cpp
  948       ValueAsMetadata::handleRAUW(FromAI, UndefValue::get(FromAI->getType()));
  952           ValueAsMetadata::handleRAUW(BCI, UndefValue::get(BCI->getType()));
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  332     auto V = cast<ValueAsMetadata>(MDO);
  525   auto *VM = dyn_cast<ValueAsMetadata>(Op);
  525   auto *VM = dyn_cast<ValueAsMetadata>(Op);
lib/IR/AsmWriter.cpp
 1560     else if (auto *MDV = dyn_cast<ValueAsMetadata>(MD)) {
 2341   auto *V = cast<ValueAsMetadata>(MD);
lib/IR/Core.cpp
  935         isa<ValueAsMetadata>(MD->getMetadata()))
  986     if (auto *L = dyn_cast<ValueAsMetadata>(MD->getMetadata())) {
  986     if (auto *L = dyn_cast<ValueAsMetadata>(MD->getMetadata())) {
 1110   return wrap(ValueAsMetadata::get(V));
 1125   if (isa<ValueAsMetadata>(MD->getMetadata()))
 1180   if (auto *MDV = dyn_cast<ValueAsMetadata>(MD->getMetadata())) {
 1180   if (auto *MDV = dyn_cast<ValueAsMetadata>(MD->getMetadata())) {
lib/IR/DIBuilder.cpp
  911   return MetadataAsValue::get(VMContext, ValueAsMetadata::get(V));
lib/IR/IntrinsicInst.cpp
   45   if (auto *V = dyn_cast<ValueAsMetadata>(MD))
   45   if (auto *V = dyn_cast<ValueAsMetadata>(MD))
lib/IR/LLVMContextImpl.h
 1273   DenseMap<Value *, ValueAsMetadata *> ValuesAsMetadata;
lib/IR/Metadata.cpp
  316   return dyn_cast<ValueAsMetadata>(&MD);
  322   return dyn_cast<ValueAsMetadata>(&MD);
  328   return dyn_cast<ValueAsMetadata>(&MD);
  348 ValueAsMetadata *ValueAsMetadata::get(Value *V) {
  352   auto *&Entry = Context.pImpl->ValuesAsMetadata[V];
  367 ValueAsMetadata *ValueAsMetadata::getIfExists(Value *V) {
  381   ValueAsMetadata *MD = I->second;
  408   ValueAsMetadata *MD = I->second;
  434   auto *&Entry = Store[To];
lib/IR/TypeFinder.cpp
  124     if (const auto *MDV = dyn_cast<ValueAsMetadata>(M->getMetadata()))
  124     if (const auto *MDV = dyn_cast<ValueAsMetadata>(M->getMetadata()))
lib/IR/Value.cpp
   77     ValueAsMetadata::handleDeletion(this);
  409     ValueAsMetadata::handleRAUW(this, New);
lib/IR/Verifier.cpp
  408   void visitValueAsMetadata(const ValueAsMetadata &MD, Function *F);
  815     if (auto *V = dyn_cast<ValueAsMetadata>(Op)) {
  826 void Verifier::visitValueAsMetadata(const ValueAsMetadata &MD, Function *F) {
  864   if (auto *V = dyn_cast<ValueAsMetadata>(MD))
  864   if (auto *V = dyn_cast<ValueAsMetadata>(MD))
 1487     auto F = dyn_cast<ValueAsMetadata>(FuncMDO);
lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
  292         cast<ValueAsMetadata>(Node->getOperand(0))->getType(),
  701             cast<ValueAsMetadata>(Node->getOperand(0))->getType(),
lib/Target/X86/X86FrameLowering.cpp
 2542     ValueAsMetadata *NodeVal = dyn_cast<ValueAsMetadata>(Node->getOperand(1));
 2542     ValueAsMetadata *NodeVal = dyn_cast<ValueAsMetadata>(Node->getOperand(1));
lib/Transforms/IPO/CrossDSOCFI.cpp
   67   auto TM = dyn_cast<ValueAsMetadata>(MD->getOperand(1));
lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
  230       if (auto *AssocVM = dyn_cast_or_null<ValueAsMetadata>(MD->getOperand(0)))
  230       if (auto *AssocVM = dyn_cast_or_null<ValueAsMetadata>(MD->getOperand(0)))
lib/Transforms/InstCombine/InstructionCombining.cpp
 3176                                     ValueAsMetadata::get(I->getOperand(0))));
 3193                                                 ValueAsMetadata::get(Undef)));
lib/Transforms/Instrumentation/AddressSanitizer.cpp
 2074     MDNode *MD = MDNode::get(M.getContext(), ValueAsMetadata::get(G));
lib/Transforms/Instrumentation/CGProfile.cpp
   90     Metadata *Vals[] = {ValueAsMetadata::get(E.first.first),
   91                         ValueAsMetadata::get(E.first.second),
lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
 1306                             MDNode::get(*C, ValueAsMetadata::get(NewGV)));
 1399                      MDNode::get(*C, ValueAsMetadata::get(Note)));
lib/Transforms/Instrumentation/SanitizerCoverage.cpp
  660   MDNode *MD = MDNode::get(F.getContext(), ValueAsMetadata::get(&F));
lib/Transforms/Utils/LCSSA.cpp
  232         DVI->setOperand(0, MetadataAsValue::get(Ctx, ValueAsMetadata::get(V)));
lib/Transforms/Utils/Local.cpp
  495                                             ValueAsMetadata::get(Undef)));
 1474     auto PhiMAV = MetadataAsValue::get(C, ValueAsMetadata::get(PHI));
 1602   return MetadataAsValue::get(C, ValueAsMetadata::get(V));
lib/Transforms/Utils/LoopRotationUtils.cpp
  168                                                 ValueAsMetadata::get(NewVal)));
lib/Transforms/Utils/LoopUnroll.cpp
   74       if (auto *Unwrapped = dyn_cast<ValueAsMetadata>(V->getMetadata())) {
   74       if (auto *Unwrapped = dyn_cast<ValueAsMetadata>(V->getMetadata())) {
   81       return Wrapped ? MetadataAsValue::get(C, ValueAsMetadata::get(V)) : V;
lib/Transforms/Utils/ValueMapper.cpp
  386         return MetadataAsValue::get(V->getContext(), ValueAsMetadata::get(LV));
tools/clang/lib/CodeGen/CodeGenModule.cpp
 5638                            Context, llvm::ValueAsMetadata::getConstant(DAddr)));
tools/clang/unittests/CodeGen/IRMatchers.h
  221       if (const auto *MT = dyn_cast<ValueAsMetadata>(M))
  221       if (const auto *MT = dyn_cast<ValueAsMetadata>(M))
tools/opt/Debugify.cpp
  154         Ctx, ValueAsMetadata::getConstant(ConstantInt::get(IntTy, N))));
tools/polly/lib/CodeGen/IRBuilder.cpp
  132     Args.push_back(ValueAsMetadata::get(FalseValue));
unittests/IR/MetadataTest.cpp
 2532   auto *MD = ValueAsMetadata::get(GV0.get());
 2532   auto *MD = ValueAsMetadata::get(GV0.get());
 2578   ValueAsMetadata::handleDeletion(CI->getValue());
 2593   TypedTrackingMDRef<ValueAsMetadata> MD(ValueAsMetadata::get(GV0.get()));
 2593   TypedTrackingMDRef<ValueAsMetadata> MD(ValueAsMetadata::get(GV0.get()));
 2610   TypedTrackingMDRef<ValueAsMetadata> MD(ValueAsMetadata::get(GV.get()));
 2610   TypedTrackingMDRef<ValueAsMetadata> MD(ValueAsMetadata::get(GV.get()));
unittests/Transforms/Utils/ValueMapperTest.cpp
  341   auto *MDA = MetadataAsValue::get(Context, ValueAsMetadata::get(&A));
  342   auto *MDC = MetadataAsValue::get(Context, ValueAsMetadata::get(&C));
usr/include/c++/7.4.0/type_traits
 1983     { typedef _Up     type; };