X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FIR%2FLLVMContextImpl.h;h=412f36db06ef87c571d18d7acafafedc76399d40;hb=8841fb5f25d959dd938b4a523f2c1672fa49bdbd;hp=0c659b81b706dbb717cef741f47eefdfe8ee51f5;hpb=4c8e74f0b75cb10820c45c86399fbd02e4a8832a;p=oota-llvm.git diff --git a/lib/IR/LLVMContextImpl.h b/lib/IR/LLVMContextImpl.h index 0c659b81b70..412f36db06e 100644 --- a/lib/IR/LLVMContextImpl.h +++ b/lib/IR/LLVMContextImpl.h @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_LLVMCONTEXT_IMPL_H -#define LLVM_LLVMCONTEXT_IMPL_H +#ifndef LLVM_LIB_IR_LLVMCONTEXTIMPL_H +#define LLVM_LIB_IR_LLVMCONTEXTIMPL_H #include "AttributeImpl.h" #include "ConstantsContext.h" @@ -30,13 +30,16 @@ #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Metadata.h" -#include "llvm/Support/ValueHandle.h" +#include "llvm/IR/ValueHandle.h" #include namespace llvm { class ConstantInt; class ConstantFP; +class DiagnosticInfoOptimizationRemark; +class DiagnosticInfoOptimizationRemarkMissed; +class DiagnosticInfoOptimizationRemarkAnalysis; class LLVMContext; class Type; class Value; @@ -56,8 +59,8 @@ struct DenseMapAPIntKeyInfo { return hash_combine(Key.type, Key.val); } }; - static inline KeyTy getEmptyKey() { return KeyTy(APInt(1,0), 0); } - static inline KeyTy getTombstoneKey() { return KeyTy(APInt(1,1), 0); } + static inline KeyTy getEmptyKey() { return KeyTy(APInt(1,0), nullptr); } + static inline KeyTy getTombstoneKey() { return KeyTy(APInt(1,1), nullptr); } static unsigned getHashValue(const KeyTy &Key) { return static_cast(hash_value(Key)); } @@ -225,9 +228,9 @@ public: MDNode *get() const { return cast_or_null(getValPtr()); } - - virtual void deleted(); - virtual void allUsesReplacedWith(Value *VNew); + + void deleted() override; + void allUsesReplacedWith(Value *VNew) override; }; class LLVMContextImpl { @@ -238,9 +241,15 @@ public: LLVMContext::InlineAsmDiagHandlerTy InlineAsmDiagHandler; void *InlineAsmDiagContext; - - typedef DenseMap IntMapTy; + + LLVMContext::DiagnosticHandlerTy DiagnosticHandler; + void *DiagnosticContext; + + LLVMContext::YieldCallbackTy YieldCallback; + void *YieldOpaqueHandle; + + typedef DenseMap IntMapTy; IntMapTy IntConstants; typedef DenseMap CAZConstants; - typedef ConstantAggrUniqueMap ArrayConstantsTy; + typedef ConstantUniqueMap ArrayConstantsTy; ArrayConstantsTy ArrayConstants; - typedef ConstantAggrUniqueMap StructConstantsTy; + typedef ConstantUniqueMap StructConstantsTy; StructConstantsTy StructConstants; - typedef ConstantAggrUniqueMap VectorConstantsTy; + typedef ConstantUniqueMap VectorConstantsTy; VectorConstantsTy VectorConstants; DenseMap CPNConstants; @@ -278,14 +287,12 @@ public: StringMap CDSConstants; - - DenseMap , BlockAddress*> BlockAddresses; - ConstantUniqueMap - ExprConstants; + DenseMap, BlockAddress *> + BlockAddresses; + ConstantUniqueMap ExprConstants; + + ConstantUniqueMap InlineAsms; - ConstantUniqueMap InlineAsms; - ConstantInt *TheTrueVal; ConstantInt *TheFalseVal; @@ -349,12 +356,22 @@ public: /// for an index. The ValueHandle ensures that ScopeINlinedAtIdx stays up /// to date. std::vector > ScopeInlinedAtRecords; - + + /// DiscriminatorTable - This table maps file:line locations to an + /// integer representing the next DWARF path discriminator to assign to + /// instructions in different blocks at the same location. + DenseMap, unsigned> DiscriminatorTable; + /// IntrinsicIDCache - Cache of intrinsic name (string) to numeric ID mappings /// requested in this context typedef DenseMap IntrinsicIDCacheTy; IntrinsicIDCacheTy IntrinsicIDCache; + /// \brief Mapping from a function to its prefix data, which is stored as the + /// operand of an unparented ReturnInst so that the prefix data has a Use. + typedef DenseMap PrefixDataMapTy; + PrefixDataMapTy PrefixDataMap; + int getOrAddScopeRecordIdxEntry(MDNode *N, int ExistingIdx); int getOrAddScopeInlinedAtIdxEntry(MDNode *Scope, MDNode *IA,int ExistingIdx);