X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FIR%2FLLVMContextImpl.h;h=bd0097c31ba9b9a680a5ab5b1277fa71b5dbbc95;hb=b6e1b309573d9332e22b6efdc9534b23b4e122de;hp=407b9856892ade3d8e8246a82f0a7d5524016ef0;hpb=e0c25bd05d3965b31daf6ad27a02fa79991045c8;p=oota-llvm.git diff --git a/lib/IR/LLVMContextImpl.h b/lib/IR/LLVMContextImpl.h index 407b9856892..bd0097c31ba 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)); } @@ -147,7 +150,7 @@ struct FunctionTypeKeyInfo { ReturnType(R), Params(P), isVarArg(V) {} KeyTy(const FunctionType* FT) : ReturnType(FT->getReturnType()), - Params(ArrayRef(FT->param_begin(), FT->param_end())), + Params(makeArrayRef(FT->param_begin(), FT->param_end())), isVarArg(FT->isVarArg()) {} bool operator==(const KeyTy& that) const { if (ReturnType != that.ReturnType) @@ -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,16 @@ public: LLVMContext::InlineAsmDiagHandlerTy InlineAsmDiagHandler; void *InlineAsmDiagContext; - - typedef DenseMap IntMapTy; + + LLVMContext::DiagnosticHandlerTy DiagnosticHandler; + void *DiagnosticContext; + bool RespectDiagnosticFilters; + + 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 +288,12 @@ public: StringMap CDSConstants; - - DenseMap , BlockAddress*> BlockAddresses; - ConstantUniqueMap - ExprConstants; + DenseMap, BlockAddress *> + BlockAddresses; + ConstantUniqueMap ExprConstants; + + ConstantUniqueMap InlineAsms; - ConstantUniqueMap InlineAsms; - ConstantInt *TheTrueVal; ConstantInt *TheFalseVal; @@ -349,7 +357,12 @@ 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;