/frameworks/compile/mclinker/lib/LD/ |
D | ELFFileFormat.cpp | 71 llvm::ELF::SHT_PROGBITS, in initStdSections() 72 llvm::ELF::SHF_ALLOC | llvm::ELF::SHF_EXECINSTR, in initStdSections() 75 pBuilder.CreateSection("", LDFileFormat::Null, llvm::ELF::SHT_NULL, 0x0); in initStdSections() 78 llvm::ELF::SHT_PROGBITS, in initStdSections() 79 llvm::ELF::SHF_ALLOC, in initStdSections() 85 llvm::ELF::SHT_NOBITS, in initStdSections() 86 llvm::ELF::SHF_ALLOC | llvm::ELF::SHF_WRITE, in initStdSections() 89 ".comment", LDFileFormat::MetaData, llvm::ELF::SHT_PROGBITS, 0x0, 0x1); in initStdSections() 93 llvm::ELF::SHT_PROGBITS, in initStdSections() 94 llvm::ELF::SHF_ALLOC | llvm::ELF::SHF_WRITE, in initStdSections() [all …]
|
D | ELFDynObjFileFormat.cpp | 21 llvm::ELF::SHT_DYNSYM, in initObjectFormat() 22 llvm::ELF::SHF_ALLOC, in initObjectFormat() 26 llvm::ELF::SHT_STRTAB, in initObjectFormat() 27 llvm::ELF::SHF_ALLOC, in initObjectFormat() 31 llvm::ELF::SHT_PROGBITS, in initObjectFormat() 32 llvm::ELF::SHF_ALLOC, in initObjectFormat() 36 llvm::ELF::SHT_HASH, in initObjectFormat() 37 llvm::ELF::SHF_ALLOC, in initObjectFormat() 42 llvm::ELF::SHT_DYNAMIC, in initObjectFormat() 43 llvm::ELF::SHF_ALLOC | llvm::ELF::SHF_WRITE, in initObjectFormat() [all …]
|
D | ELFExecFileFormat.cpp | 22 llvm::ELF::SHT_DYNSYM, in initObjectFormat() 23 llvm::ELF::SHF_ALLOC, in initObjectFormat() 27 llvm::ELF::SHT_STRTAB, in initObjectFormat() 28 llvm::ELF::SHF_ALLOC, in initObjectFormat() 32 llvm::ELF::SHT_PROGBITS, in initObjectFormat() 33 llvm::ELF::SHF_ALLOC, in initObjectFormat() 37 llvm::ELF::SHT_HASH, in initObjectFormat() 38 llvm::ELF::SHF_ALLOC, in initObjectFormat() 43 llvm::ELF::SHT_DYNAMIC, in initObjectFormat() 44 llvm::ELF::SHF_ALLOC | llvm::ELF::SHF_WRITE, in initObjectFormat() [all …]
|
D | Diagnostic.cpp | 33 llvm::StringRef desc = m_Engine.infoMap().getDescription(getID(), false); in format() 106 llvm::report_fatal_error( in format() 107 llvm::Twine("Mismatched {} in the diagnostic: ") + in format() 108 llvm::Twine(getID())); in format() 115 llvm::report_fatal_error(llvm::Twine("In diagnostic: ") + in format() 116 llvm::Twine(getID()) + llvm::Twine(": ") + in format() 117 llvm::Twine(pBegin) + in format() 118 llvm::Twine("\nNo given arugment number:\n")); in format() 128 llvm::report_fatal_error( in format() 129 llvm::Twine("In diagnostic: ") + llvm::Twine(getID()) + in format() [all …]
|
D | ELFReader.cpp | 46 const llvm::ELF::Elf32_Ehdr* hdr = in isELF() 47 reinterpret_cast<const llvm::ELF::Elf32_Ehdr*>(pELFHeader); in isELF() 48 if (memcmp(llvm::ELF::ElfMagic, hdr, 4) == 0) in isELF() 67 llvm::StringRef pRegion, in readSymbols() 70 size_t entsize = pRegion.size() / sizeof(llvm::ELF::Elf32_Sym); in readSymbols() 71 const llvm::ELF::Elf32_Sym* symtab = in readSymbols() 72 reinterpret_cast<const llvm::ELF::Elf32_Sym*>(pRegion.begin()); in readSymbols() 91 if (llvm::sys::IsLittleEndianHost) { in readSymbols() 105 if (pInput.type() == Input::Object && st_shndx < llvm::ELF::SHN_LORESERVE && in readSymbols() 106 st_shndx != llvm::ELF::SHN_UNDEF) { in readSymbols() [all …]
|
/frameworks/compile/libbcc/lib/Renderscript/ |
D | RSForEachExpand.cpp | 57 class RSForEachExpandPass : public llvm::ModulePass { 90 llvm::Module *Module; 91 llvm::LLVMContext *Context; 98 llvm::FunctionType *ExpandedFunctionType; 107 uint32_t getRootSignature(llvm::Function *Function) { in getRootSignature() 108 const llvm::NamedMDNode *ExportForEachMetadata = in getRootSignature() 112 llvm::SmallVector<llvm::Type*, 8> RootArgTys; in getRootSignature() 113 for (llvm::Function::arg_iterator B = Function->arg_begin(), in getRootSignature() 134 llvm::MDNode *SigNode = ExportForEachMetadata->getOperand(0); in getRootSignature() 136 llvm::Metadata *SigMD = SigNode->getOperand(0); in getRootSignature() [all …]
|
D | RSInvokeHelperPass.cpp | 45 class RSInvokeHelperPass : public llvm::FunctionPass { 49 llvm::StructType* rsAllocationType; 50 llvm::StructType* rsElementType; 51 llvm::StructType* rsSamplerType; 52 llvm::StructType* rsScriptType; 53 llvm::StructType* rsTypeType; 55 llvm::Constant* rsAllocationSetObj; 56 llvm::Constant* rsElementSetObj; 57 llvm::Constant* rsSamplerSetObj; 58 llvm::Constant* rsScriptSetObj; [all …]
|
D | RSGlobalInfoPass.cpp | 66 class RSGlobalInfoPass: public llvm::ModulePass { 74 static uint32_t getEncodedProperties(const llvm::GlobalVariable &GV) { in getEncodedProperties() 90 if (GV.getLinkage() == llvm::GlobalValue::InternalLinkage) { in getEncodedProperties() 105 void getAnalysisUsage(llvm::AnalysisUsage &AU) const override { in getAnalysisUsage() 110 bool runOnModule(llvm::Module &M) override { in runOnModule() 111 std::vector<llvm::Constant *> GVAddresses; in runOnModule() 112 std::vector<llvm::Constant *> GVNames; in runOnModule() 118 const llvm::DataLayout &DL = M.getDataLayout(); in runOnModule() 126 llvm::Type *VoidPtrTy = llvm::Type::getInt8PtrTy(M.getContext()); in runOnModule() 129 llvm::Type *Int32Ty = llvm::Type::getInt32Ty(M.getContext()); in runOnModule() [all …]
|
D | RSInvariant.cpp | 64 class RSInvariantPass : public llvm::FunctionPass { 70 virtual bool doInitialization(llvm::Module &M) { in doInitialization() 71 EmptyMDNode = llvm::MDNode::get(M.getContext(), llvm::None); in doInitialization() 75 virtual bool runOnFunction(llvm::Function &F) { in runOnFunction() 78 for (llvm::Value &Arg : F.args()) { in runOnFunction() 79 const llvm::Type *ArgType = Arg.getType(); in runOnFunction() 81 const llvm::Type *ArgPtrDomainType = ArgType->getPointerElementType(); in runOnFunction() 82 if (auto ArgPtrDomainStructType = llvm::dyn_cast<llvm::StructType>(ArgPtrDomainType)) { in runOnFunction() 84 const llvm::StringRef StructName = getUnsuffixedStructName(ArgPtrDomainStructType); in runOnFunction() 110 bool markInvariantUserLoads(llvm::Value *Value) { in markInvariantUserLoads() [all …]
|
D | RSX86CallConvPass.cpp | 42 class RSX86_64CallConvPass: public llvm::ModulePass { 44 bool IsRSFunctionOfInterest(llvm::Function &F) { in IsRSFunctionOfInterest() 50 llvm::StringRef FName = F.getName(); in IsRSFunctionOfInterest() 60 bool IsDerefNeeded(llvm::Function *F, llvm::Argument &Arg) { in IsDerefNeeded() 62 llvm::Type *ArgTy = Arg.getType(); in IsDerefNeeded() 74 llvm::Type *StructTy = ArgTy->getPointerElementType(); in IsDerefNeeded() 79 llvm::StringRef FName = F->getName(); in IsDerefNeeded() 91 bool FillArgsToDeref(llvm::Function *F, std::vector<unsigned> &ArgNums) { in FillArgsToDeref() 107 llvm::Function *RedefineFn(llvm::Function *OrigFn, in RedefineFn() 110 llvm::FunctionType *FTy = OrigFn->getFunctionType(); in RedefineFn() [all …]
|
D | RSScriptGroupFusion.cpp | 30 using llvm::Function; 31 using llvm::Module; 140 llvm::FunctionType* getFusedFuncType(bcc::BCCContext& Context, in getFusedFuncType() 155 llvm::SmallVector<llvm::Type*, 8> ArgTys; in getFusedFuncType() 161 llvm::Type* I32Ty = llvm::IntegerType::get(Context.getLLVMContext(), 32); in getFusedFuncType() 176 llvm::Type* retTy = lastF->getReturnType(); in getFusedFuncType() 178 return llvm::FunctionType::get(retTy, ArgTys, false); in getFusedFuncType() 192 llvm::FunctionType* fusedType = in fuseKernels() 202 llvm::LLVMContext& ctxt = Context.getLLVMContext(); in fuseKernels() 204 llvm::BasicBlock* block = llvm::BasicBlock::Create(ctxt, "entry", fusedKernel); in fuseKernels() [all …]
|
/frameworks/compile/slang/BitWriter_2_9_func/ |
D | ValueEnumerator.h | 22 namespace llvm { 45 typedef std::vector<llvm::Type*> TypeList; 48 typedef std::vector<std::pair<const llvm::Value*, unsigned> > ValueList; 50 typedef llvm::DenseMap<llvm::Type*, unsigned> TypeMapType; 54 typedef llvm::DenseMap<const llvm::Value*, unsigned> ValueMapType; 59 std::vector<const llvm::Metadata *> MDs; 60 llvm::SmallVector<const llvm::LocalAsMetadata *, 8> FunctionLocalMDs; 61 typedef llvm::DenseMap<const llvm::Metadata *, unsigned> MetadataMapType; 66 typedef llvm::DenseMap<llvm::AttributeSet, unsigned> AttributeGroupMapType; 68 std::vector<llvm::AttributeSet> AttributeGroups; [all …]
|
/frameworks/compile/slang/BitWriter_2_9/ |
D | ValueEnumerator.h | 22 namespace llvm { 45 typedef std::vector<llvm::Type*> TypeList; 48 typedef std::vector<std::pair<const llvm::Value*, unsigned> > ValueList; 50 typedef llvm::DenseMap<llvm::Type*, unsigned> TypeMapType; 54 typedef llvm::DenseMap<const llvm::Value*, unsigned> ValueMapType; 59 std::vector<const llvm::Metadata *> MDs; 60 llvm::SmallVector<const llvm::LocalAsMetadata *, 8> FunctionLocalMDs; 61 typedef llvm::DenseMap<const llvm::Metadata *, unsigned> MetadataMapType; 66 typedef llvm::DenseMap<llvm::AttributeSet, unsigned> AttributeGroupMapType; 68 std::vector<llvm::AttributeSet> AttributeGroups; [all …]
|
/frameworks/compile/slang/BitWriter_3_2/ |
D | ValueEnumerator.h | 23 namespace llvm { 46 typedef std::vector<llvm::Type*> TypeList; 49 typedef std::vector<std::pair<const llvm::Value*, unsigned> > ValueList; 51 llvm::UseListOrderStack UseListOrders; 53 typedef llvm::DenseMap<llvm::Type*, unsigned> TypeMapType; 57 typedef llvm::DenseMap<const llvm::Value*, unsigned> ValueMapType; 62 std::vector<const llvm::Metadata *> MDs; 63 llvm::SmallVector<const llvm::LocalAsMetadata *, 8> FunctionLocalMDs; 64 typedef llvm::DenseMap<const llvm::Metadata *, unsigned> MetadataMapType; 69 typedef llvm::DenseMap<llvm::AttributeSet, unsigned> AttributeGroupMapType; [all …]
|
/frameworks/compile/libbcc/tools/bcc_compat/ |
D | Main.cpp | 48 llvm::cl::list<std::string> 49 OptInputFilenames(llvm::cl::Positional, llvm::cl::OneOrMore, 50 llvm::cl::desc("<input bitcode files>")); 52 llvm::cl::opt<std::string> 53 OptOutputFilename("o", llvm::cl::desc("Specify the output filename"), 54 llvm::cl::value_desc("filename")); 56 llvm::cl::opt<std::string> 57 OptRuntimePath("rt-path", llvm::cl::desc("Specify the runtime library path"), 58 llvm::cl::value_desc("path")); 60 llvm::cl::opt<std::string> [all …]
|
/frameworks/compile/mclinker/lib/Target/ |
D | ELFDynamic.cpp | 93 reserveOne(llvm::ELF::DT_SONAME); in reserveEntries() 96 reserveOne(llvm::ELF::DT_SYMBOLIC); in reserveEntries() 100 reserveOne(llvm::ELF::DT_INIT); in reserveEntries() 103 reserveOne(llvm::ELF::DT_FINI); in reserveEntries() 106 reserveOne(llvm::ELF::DT_PREINIT_ARRAY); in reserveEntries() 107 reserveOne(llvm::ELF::DT_PREINIT_ARRAYSZ); in reserveEntries() 111 reserveOne(llvm::ELF::DT_INIT_ARRAY); in reserveEntries() 112 reserveOne(llvm::ELF::DT_INIT_ARRAYSZ); in reserveEntries() 116 reserveOne(llvm::ELF::DT_FINI_ARRAY); in reserveEntries() 117 reserveOne(llvm::ELF::DT_FINI_ARRAYSZ); in reserveEntries() [all …]
|
/frameworks/compile/libbcc/tools/bcc/ |
D | Main.cpp | 60 llvm::cl::list<std::string> 61 OptInputFilenames(llvm::cl::Positional, llvm::cl::OneOrMore, 62 llvm::cl::desc("<input bitcode files>")); 64 llvm::cl::list<std::string> 65 OptMergePlans("merge", llvm::cl::ZeroOrMore, 66 llvm::cl::desc("Lists of kernels to merge (as source-and-slot " 69 llvm::cl::list<std::string> 70 OptInvokes("invoke", llvm::cl::ZeroOrMore, 71 llvm::cl::desc("Invocable functions")); 73 llvm::cl::opt<std::string> [all …]
|
/frameworks/compile/libbcc/lib/Support/ |
D | Initialization.cpp | 47 llvm::remove_fatal_error_handler(); in Initialize() 48 llvm::install_fatal_error_handler(llvm_error_handler, nullptr); in Initialize() 51 llvm::InitializeAllTargets(); in Initialize() 52 llvm::InitializeAllTargetMCs(); in Initialize() 53 llvm::InitializeAllAsmPrinters(); in Initialize() 55 llvm::PassRegistry &Registry = *llvm::PassRegistry::getPassRegistry(); in Initialize() 56 llvm::initializeCore(Registry); in Initialize() 57 llvm::initializeScalarOpts(Registry); in Initialize() 58 llvm::initializeVectorization(Registry); in Initialize() 59 llvm::initializeIPO(Registry); in Initialize() [all …]
|
D | CompilerConfig.cpp | 37 llvm::StringMap<bool> features; in HasF16C() 38 if (!llvm::sys::getHostCPUFeatures(features)) in HasF16C() 55 llvm::RegisterScheduler::setDefault(llvm::createDefaultScheduler); in CompilerConfig() 67 mTargetOpts.FloatABIType = llvm::FloatABI::Soft; in CompilerConfig() 76 mCodeModel = llvm::CodeModel::Small; in CompilerConfig() 81 mRelocModel = llvm::Reloc::Default; in CompilerConfig() 86 mOptLevel = llvm::CodeGenOpt::Default; in CompilerConfig() 91 mArchType = llvm::Triple::UnknownArch; in CompilerConfig() 101 mTarget = llvm::TargetRegistry::lookupTarget(mTriple, error); in initializeTarget() 113 mArchType = llvm::Triple::getArchTypeForLLVMName(mTarget->getName()); in initializeArch() [all …]
|
/frameworks/compile/slang/ |
D | slang_backend.cpp | 83 mPerFunctionPasses = new llvm::legacy::FunctionPassManager(mpModule); in CreateFunctionPasses() 85 llvm::PassManagerBuilder PMBuilder; in CreateFunctionPasses() 93 mPerModulePasses = new llvm::legacy::PassManager(); in CreateModulePasses() 95 llvm::PassManagerBuilder PMBuilder; in CreateModulePasses() 124 mCodeGenPasses = new llvm::legacy::FunctionPassManager(mpModule); in CreateCodeGenPasses() 131 const llvm::Target* TargetInfo = in CreateCodeGenPasses() 132 llvm::TargetRegistry::lookupTarget(Triple, Error); in CreateCodeGenPasses() 139 llvm::TargetOptions Options; in CreateCodeGenPasses() 150 Options.FloatABIType = llvm::FloatABI::Hard; in CreateCodeGenPasses() 155 llvm::Reloc::Model RM = llvm::Reloc::Static; in CreateCodeGenPasses() [all …]
|
/frameworks/compile/mclinker/lib/Target/X86/ |
D | X86LDBackend.cpp | 47 llvm::Triple::ArchType arch = pConfig.targets().triple().getArch(); in X86GNULDBackend() 48 assert(arch == llvm::Triple::x86 || arch == llvm::Triple::x86_64); in X86GNULDBackend() 49 if (arch == llvm::Triple::x86 || in X86GNULDBackend() 50 pConfig.targets().triple().getEnvironment() == llvm::Triple::GNUX32) { in X86GNULDBackend() 53 if (arch == llvm::Triple::x86) in X86GNULDBackend() 54 m_PointerRel = llvm::ELF::R_386_32; in X86GNULDBackend() 56 m_PointerRel = llvm::ELF::R_X86_64_32; in X86GNULDBackend() 60 m_PointerRel = llvm::ELF::R_X86_64_64; in X86GNULDBackend() 175 unsigned int plt0_size = llvm::cast<PLTEntryBase>((*it)).size(); in emitSectionData() 177 memcpy(buffer, llvm::cast<PLTEntryBase>((*it)).getValue(), plt0_size); in emitSectionData() [all …]
|
/frameworks/compile/mclinker/lib/Target/Hexagon/ |
D | HexagonRelocator.cpp | 36 if (pType == llvm::ELF::R_HEX_RELATIVE || pSym == NULL) in helper_DynRel_init() 73 rsym, *got_entry, 0x0, llvm::ELF::R_HEX_RELATIVE, pParent); in helper_GOT_init() 77 rsym, *got_entry, 0x0, llvm::ELF::R_HEX_GLOB_DAT, pParent); in helper_GOT_init() 107 rela_entry.setType(llvm::ELF::R_HEX_JMP_SLOT); in helper_PLT_init() 212 if ((pSection.getLink()->flag() & llvm::ELF::SHF_ALLOC) == 0) in scanRelocation() 243 case llvm::ELF::R_HEX_LO16: in scanLocalReloc() 244 case llvm::ELF::R_HEX_HI16: in scanLocalReloc() 245 case llvm::ELF::R_HEX_16: in scanLocalReloc() 246 case llvm::ELF::R_HEX_8: in scanLocalReloc() 247 case llvm::ELF::R_HEX_32_6_X: in scanLocalReloc() [all …]
|
/frameworks/compile/libbcc/lib/Core/ |
D | Source.cpp | 40 static inline llvm::Module *helper_load_bitcode(llvm::LLVMContext &pContext, in helper_load_bitcode() 41 std::unique_ptr<llvm::MemoryBuffer> &&pInput) { in helper_load_bitcode() 42 …llvm::ErrorOr<llvm::Module *> moduleOrError = llvm::getLazyBitcodeModule(std::move(pInput), pConte… in helper_load_bitcode() 55 void Source::setModule(llvm::Module *pModule) { in setModule() 64 llvm::StringRef input_data(pBitcode, pBitcodeSize); in CreateFromBuffer() 65 std::unique_ptr<llvm::MemoryBuffer> input_memory = in CreateFromBuffer() 66 llvm::MemoryBuffer::getMemBuffer(input_data, "", false); in CreateFromBuffer() 73 llvm::Module *module = helper_load_bitcode(pContext.mImpl->mLLVMContext, in CreateFromBuffer() 89 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> mb_or_error = in CreateFromFile() 90 llvm::MemoryBuffer::getFile(pPath); in CreateFromFile() [all …]
|
/frameworks/compile/mclinker/lib/Target/Mips/ |
D | MipsRelocator.cpp | 22 namespace llvm { namespace 43 if (llvm::ELF::R_MIPS_NONE == pType) in HasSubType() 47 llvm::ELF::R_MIPS_NONE != (type & 0xff); in HasSubType() 62 if (pIsRel && (type() < llvm::ELF::R_MIPS_LA25_LUI || in MipsRelocationInfo() 63 type() > llvm::ELF::R_MIPS_LA25_ADD)) in MipsRelocationInfo() 69 bool isNone() const { return llvm::ELF::R_MIPS_NONE == type(); } in isNone() 71 bool isLast() const { return llvm::ELF::R_MIPS_NONE == (m_Type >> 8); } in isLast() 200 if ((pSection.getLink()->flag() & llvm::ELF::SHF_ALLOC) == 0) in scanRelocation() 251 case llvm::ELF::R_MIPS_NONE: in scanLocalReloc() 252 case llvm::ELF::R_MIPS_16: in scanLocalReloc() [all …]
|
/frameworks/compile/libbcc/bcinfo/ |
D | MetadataExtractor.cpp | 41 llvm::StringRef getStringOperand(const llvm::Metadata *node) { in getStringOperand() 42 if (auto *mds = llvm::dyn_cast_or_null<const llvm::MDString>(node)) { in getStringOperand() 45 return llvm::StringRef(); in getStringOperand() 49 const llvm::Metadata *m) { in extractUIntFromMetadataString() 50 llvm::StringRef SigString = getStringOperand(m); in extractUIntFromMetadataString() 63 static const llvm::StringRef PragmaMetadataName = "#pragma"; 67 static const llvm::StringRef ExportVarMetadataName = "#rs_export_var"; 71 static const llvm::StringRef ExportFuncMetadataName = "#rs_export_func"; 75 static const llvm::StringRef ExportForEachNameMetadataName = 80 static const llvm::StringRef ExportForEachMetadataName = "#rs_export_foreach"; [all …]
|