Home
last modified time | relevance | path

Searched refs:llvm (Results 1 – 25 of 412) sorted by relevance

12345678910>>...17

/frameworks/compile/mclinker/lib/Target/Mips/
DMipsAbiFlags.cpp25 typedef llvm::object::ELFType<llvm::support::little, false> ELF32LE;
26 typedef llvm::object::Elf_Mips_ABIFlags<ELF32LE> ElfMipsAbiFlags;
50 assert(pSection.type() == llvm::ELF::SHT_MIPS_ABIFLAGS && in fillBySection()
59 if (secData->size() != 2 || !llvm::isa<RegionFragment>(secData->front())) { in fillBySection()
64 const auto& frag = llvm::cast<RegionFragment>(secData->front()); in fillBySection()
86 switch (flags & llvm::ELF::EF_MIPS_ARCH) { in getIsaLevel()
87 case llvm::ELF::EF_MIPS_ARCH_1: in getIsaLevel()
89 case llvm::ELF::EF_MIPS_ARCH_2: in getIsaLevel()
91 case llvm::ELF::EF_MIPS_ARCH_3: in getIsaLevel()
93 case llvm::ELF::EF_MIPS_ARCH_4: in getIsaLevel()
[all …]
/frameworks/compile/libbcc/lib/
DRSKernelExpand.cpp89 class RSKernelExpandPass : public llvm::ModulePass {
96 typedef std::unordered_set<llvm::Function *> FunctionSet;
124 llvm::Module *Module;
125 llvm::LLVMContext *Context;
132 llvm::FunctionType *ExpandedForEachType;
133 llvm::Type *RsExpandKernelDriverInfoPfxTy;
144 uint32_t getRootSignature(llvm::Function *Function) { in getRootSignature()
145 const llvm::NamedMDNode *ExportForEachMetadata = in getRootSignature()
149 llvm::SmallVector<llvm::Type*, 8> RootArgTys; in getRootSignature()
150 for (llvm::Function::arg_iterator B = Function->arg_begin(), in getRootSignature()
[all …]
DRSX86TranslateGEPPass.cpp37 class RSX86TranslateGEPPass : public llvm::FunctionPass {
40 llvm::LLVMContext *Context;
41 const llvm::DataLayout DL;
44 bool GEPIndexesStructType(const llvm::GetElementPtrInst *GEP) { in GEPIndexesStructType()
45 for (llvm::gep_type_iterator GTI = gep_type_begin(GEP), in GEPIndexesStructType()
48 if (llvm::dyn_cast<llvm::StructType>(*GTI)) { in GEPIndexesStructType()
56 llvm::Value *incrementOffset(llvm::Value *accum, llvm::Value *incr, in incrementOffset()
57 llvm::Instruction *InsertBefore) { in incrementOffset()
60 return llvm::BinaryOperator::CreateAdd(accum, incr, "", InsertBefore); in incrementOffset()
69 llvm::Value *computeGEPOffset(llvm::GetElementPtrInst *GEP) { in computeGEPOffset()
[all …]
DRSAddDebugInfoPass.cpp45 class RSAddDebugInfoPass : public llvm::ModulePass {
56 virtual bool runOnModule(llvm::Module &Module) { in runOnModule()
70 llvm::SmallSetVector<llvm::Function *, 16> expandFuncs{}; in runOnModule()
75 if (llvm::Function *const func = Module.getFunction(expandName)) in runOnModule()
88 llvm::DIBuilder DebugInfo(Module); in runOnModule()
113 void initializeDebugInfo(llvm::DIBuilder &DebugInfo, in initializeDebugInfo()
114 const llvm::Module &Module) { in initializeDebugInfo()
115 llvm::LLVMContext &ctx = Module.getContext(); in initializeDebugInfo()
118 DebugInfo.createCompileUnit(llvm::dwarf::DW_LANG_GOOGLE_RenderScript, in initializeDebugInfo()
127 llvm::NamedMDNode *mdCompileUnitList = in initializeDebugInfo()
[all …]
DRSGlobalInfoPass.cpp66 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 …]
DRSInvokeHelperPass.cpp44 class RSInvokeHelperPass : public llvm::FunctionPass {
48 llvm::StructType* rsAllocationType;
49 llvm::StructType* rsElementType;
50 llvm::StructType* rsSamplerType;
51 llvm::StructType* rsScriptType;
52 llvm::StructType* rsTypeType;
54 llvm::Constant* rsAllocationSetObj;
55 llvm::Constant* rsElementSetObj;
56 llvm::Constant* rsSamplerSetObj;
57 llvm::Constant* rsScriptSetObj;
[all …]
DRSInvariant.cpp64 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 …]
DInitialization.cpp47 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 …]
DRSX86CallConvPass.cpp42 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()
94 bool FillArgsToDeref(llvm::Function *F, std::vector<unsigned> &ArgNums) { in FillArgsToDeref()
110 llvm::Function *RedefineFn(llvm::Function *OrigFn, in RedefineFn()
113 llvm::FunctionType *FTy = OrigFn->getFunctionType(); in RedefineFn()
[all …]
DCompilerConfig.cpp38 llvm::StringMap<bool> features; in AddX86NativeCPUFeatures()
39 if (llvm::sys::getHostCPUFeatures(features)) { in AddX86NativeCPUFeatures()
61 mTargetOpts.FloatABIType = llvm::FloatABI::Soft; in CompilerConfig()
66 mCodeModel = llvm::CodeModel::Small; in CompilerConfig()
71 mOptLevel = llvm::CodeGenOpt::Default; in CompilerConfig()
76 mArchType = llvm::Triple::UnknownArch; in CompilerConfig()
86 mTarget = llvm::TargetRegistry::lookupTarget(mTriple, error); in initializeTarget()
98 mArchType = llvm::Triple::getArchTypeForLLVMName(mTarget->getName()); in initializeArch()
100 mArchType = llvm::Triple::UnknownArch; in initializeArch()
108 case llvm::Triple::arm: { in initializeArch()
[all …]
DRSScriptGroupFusion.cpp30 using llvm::Function;
31 using llvm::Module;
133 llvm::FunctionType* getFusedFuncType(bcc::BCCContext& Context, in getFusedFuncType()
148 llvm::SmallVector<llvm::Type*, 8> ArgTys; in getFusedFuncType()
154 llvm::Type* I32Ty = llvm::IntegerType::get(Context.getLLVMContext(), 32); in getFusedFuncType()
169 llvm::Type* retTy = lastF->getReturnType(); in getFusedFuncType()
171 return llvm::FunctionType::get(retTy, ArgTys, false); in getFusedFuncType()
185 llvm::FunctionType* fusedType = in fuseKernels()
195 llvm::LLVMContext& ctxt = Context.getLLVMContext(); in fuseKernels()
197 llvm::BasicBlock* block = llvm::BasicBlock::Create(ctxt, "entry", fusedKernel); in fuseKernels()
[all …]
DSource.cpp46 static inline std::unique_ptr<llvm::Module> helper_load_bitcode(llvm::LLVMContext &pContext, in helper_load_bitcode()
47 std::unique_ptr<llvm::MemoryBuffer> &&pInput) { in helper_load_bitcode()
48 llvm::ErrorOr<std::unique_ptr<llvm::Module> > moduleOrError in helper_load_bitcode()
49 = llvm::getLazyBitcodeModule(std::move(pInput), pContext); in helper_load_bitcode()
65 static void helper_set_module_metadata_from_bitcode_wrapper(llvm::Module &module, in helper_set_module_metadata_from_bitcode_wrapper()
68 llvm::LLVMContext &llvmContext = module.getContext(); in helper_set_module_metadata_from_bitcode_wrapper()
70 llvm::NamedMDNode *const wrapperMDNode = in helper_set_module_metadata_from_bitcode_wrapper()
74 llvm::SmallVector<llvm::Metadata *, 2> wrapperInfo = { in helper_set_module_metadata_from_bitcode_wrapper()
75 llvm::MDString::get(llvmContext, llvm::utostr(compilerVersion)), in helper_set_module_metadata_from_bitcode_wrapper()
76 llvm::MDString::get(llvmContext, llvm::utostr(optimizationLevel)) in helper_set_module_metadata_from_bitcode_wrapper()
[all …]
/frameworks/compile/mclinker/lib/LD/
DELFFileFormat.cpp71 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 …]
DELFExecFileFormat.cpp22 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 …]
DELFDynObjFileFormat.cpp21 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 …]
DDiagnostic.cpp33 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 …]
/frameworks/compile/slang/BitWriter_2_9/
DValueEnumerator.h22 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_func/
DValueEnumerator.h22 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/
DValueEnumerator.h23 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/
DMain.cpp61 llvm::cl::list<std::string>
62 OptInputFilenames(llvm::cl::Positional, llvm::cl::OneOrMore,
63 llvm::cl::desc("<input bitcode files>"));
65 llvm::cl::list<std::string>
66 OptMergePlans("merge", llvm::cl::ZeroOrMore,
67 llvm::cl::desc("Lists of kernels to merge (as source-and-slot "
70 llvm::cl::list<std::string>
71 OptInvokes("invoke", llvm::cl::ZeroOrMore,
72 llvm::cl::desc("Invocable functions"));
74 llvm::cl::opt<std::string>
[all …]
/frameworks/compile/libbcc/tools/bcc_compat/
DMain.cpp44 llvm::cl::list<std::string>
45 OptInputFilenames(llvm::cl::Positional, llvm::cl::OneOrMore,
46 llvm::cl::desc("<input bitcode files>"));
48 llvm::cl::opt<std::string>
49 OptOutputFilename("o", llvm::cl::desc("Specify the output filename"),
50 llvm::cl::value_desc("filename"));
52 llvm::cl::opt<std::string>
53 OptRuntimePath("rt-path", llvm::cl::desc("Specify the runtime library path"),
54 llvm::cl::value_desc("path"));
56 llvm::cl::opt<std::string>
[all …]
/frameworks/compile/mclinker/lib/Target/
DELFDynamic.cpp93 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/slang/
Dslang_backend.cpp82 class VersionInfoPass : public llvm::ModulePass {
95 virtual bool runOnModule(llvm::Module &M) override { in runOnModule()
101 auto ver = llvm::MDString::get(ctx, versionString); in runOnModule()
103 llvm::MDNode::get(ctx, llvm::ArrayRef<llvm::Metadata *>(ver))); in runOnModule()
110 llvm::ModulePass *createVersionInfoPass(const clang::CodeGenOptions &cgo) { in createVersionInfoPass()
119 mPerFunctionPasses = new llvm::legacy::FunctionPassManager(mpModule); in CreateFunctionPasses()
121 llvm::PassManagerBuilder PMBuilder; in CreateFunctionPasses()
129 mPerModulePasses = new llvm::legacy::PassManager(); in CreateModulePasses()
131 llvm::PassManagerBuilder PMBuilder; in CreateModulePasses()
161 mCodeGenPasses = new llvm::legacy::FunctionPassManager(mpModule); in CreateCodeGenPasses()
[all …]
/frameworks/compile/libbcc/include/bcc/
DCompilerConfig.h28 namespace llvm {
46 llvm::TargetOptions mTargetOpts;
48 llvm::CodeModel::Model mCodeModel;
50 llvm::CodeGenOpt::Level mOptLevel;
52 llvm::Optional<llvm::Reloc::Model> mRelocModel;
64 const llvm::Target *mTarget;
67 llvm::Triple::ArchType mArchType;
82 inline const llvm::TargetOptions &getTargetOptions() const in getTargetOptions()
84 inline llvm::TargetOptions &getTargetOptions() in getTargetOptions()
87 inline llvm::CodeModel::Model getCodeModel() const in getCodeModel()
[all …]
/frameworks/compile/mclinker/lib/Target/X86/
DX86LDBackend.cpp47 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 …]

12345678910>>...17