search for: externallinkage

Displaying 20 results from an estimated 212 matches for "externallinkage".

2009 Jul 18
2
[LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
I am iterating through Modules symbols for 'test/CodeGen/X86/memcpy.bc I get :- ---------- Functions ---------- llvm.memcpy.i64 Mangled name = llvm.memcpy.i64 DefaultVisibility ExternalLinkage - Externally visible. my_memcpy Mangled name = my_memcpy DefaultVisibility ExternalLinkage - Externally visible. my_memcpy2 Mangled name = my_memcpy2 DefaultVisibility ExternalLinkage - Externally visible. abort Mangled name = abort De...
2009 Jul 18
3
[LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
...being used. I am using GlobalValue::getUses() to filter it. Whats going on with 'abort' ? Aaron > > -Chris > > > I get :- > > ---------- Functions ---------- > llvm.memcpy.i64 > Mangled name = llvm.memcpy.i64 > DefaultVisibility > ExternalLinkage - Externally visible. > my_memcpy > Mangled name = my_memcpy > DefaultVisibility > ExternalLinkage - Externally visible. > my_memcpy2 > Mangled name = my_memcpy2 > DefaultVisibility > ExternalLinkage - Externally visible. >...
2009 Jul 18
0
[LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
...Modules symbols for 'test/CodeGen/X86/memcpy.bc If you're iterating over functions, just ignore all intrinsics. -Chris > > I get :- > > ---------- Functions ---------- > llvm.memcpy.i64 > Mangled name = llvm.memcpy.i64 > DefaultVisibility > ExternalLinkage - Externally visible. > my_memcpy > Mangled name = my_memcpy > DefaultVisibility > ExternalLinkage - Externally visible. > my_memcpy2 > Mangled name = my_memcpy2 > DefaultVisibility > ExternalLinkage - Externally visible. >...
2015 Jul 24
3
[LLVMdev] LLVM linkage flags
An enumeration for the kinds of linkage for global values. Hi, I'm currently writing a compiler that takes llvm-ir input. I'm a little confused by the following linkage flags: Enumerator: > > ExternalLinkage: Externally visible function > > AvailableExternallyLinkage: Available for inspection, not emission. > > LinkOnceAnyLinkage: Keep one copy of function when linking (inline) > > LinkOnceODRLinkage: Same, but only replaced by something equivalent. > > WeakAnyLinkage: Keep one...
2020 Oct 01
3
Creating a global variable for a struct array
...* filenm; int n; }dhash; //create global variable to hold filename string Constant *filenmInit = ConstantDataArray::getString(M.getContext(), "myfile.txt"); Constant *filenmConst = new GlobalVariable(M, filenmInit->getType(), false, GlobalVariable::ExternalLinkage, filenmInit, ".filenm"); //create global variable for int Constant* intInit = ConstantInt::get(Type::getInt32Ty(M.getContext()), 10); Constant* intConst = new GlobalVariable(M, intInit->getType(), false, GlobalVariable::ExternalLinkage, intIn...
2015 May 30
2
[LLVMdev] Linking modules across contexts crashes
...x2 = new LLVMContext; Module* module2 = new Module("module2", *ctx2); LLVMContext *ctx3 = new LLVMContext; Module* module3 = new Module("module3", *ctx3); // fill modules llvm::Function::Create(llvm::FunctionType::get(Type::getInt32Ty(*ctx1), false), llvm::Function::ExternalLinkage, "f1", module1); llvm::Function::Create(llvm::FunctionType::get(Type::getInt32Ty(*ctx2), false), llvm::Function::ExternalLinkage, "f2", module2); llvm::Function::Create(llvm::FunctionType::get(Type::getInt32Ty(*ctx3), false), llvm::Function::ExternalLinkage, "f3", mo...
2015 Jul 21
1
[LLVMdev] RFC: ThinLTO Symbol Linkage and Renaming
...not come through > in the copied text below well. > > > > Thanks! > > Teresa > > > > > > ThinLTO Symbol Linkage and Renaming > > > > > > 1 Introduction > > 2 Non-Discardable Values > > 2.2 Linkage Effects > > 2.2.2 ExternalLinkage > > 2.2.1 WeakAnyLinkage > > 2.2.2 WeakODRLinkage > > 2.2.3 AppendingLinkage > > 2.2.4 CommonLinkage > > 3 Linkonce Values > > 3.1 Linkage Effects > > 3.2 Importing Strategy > > 4 Static Values > > 4.1 Static Variab...
2013 Jun 27
2
[LLVMdev] Problem with linking modules which use a shared type
...erType::get( context, 32 ) ); Type* sType = StructType::create( types, "T" ); types.clear(); types.push_back( sType ); FunctionType* ft = FunctionType::get( Type::getVoidTy( context ), types, false ); // m1 Function* f = Function::Create( ft, GlobalValue::ExternalLinkage, "f", m1 ); b = BasicBlock::Create( context, "b", f ); ReturnInst::Create( context, b ); verifyModule(*m1); // m2 Function* fDecl = Function::Create( ft, GlobalValue::ExternalLinkage, "f", m2 ); Function* h = Function::Create( ft, Globa...
2015 Jul 14
3
[LLVMdev] RFC: ThinLTO Symbol Linkage and Renaming
...luded below. I've also attached the doc in pdf form, since the formatting (especially for the table at the end) may not come through in the copied text below well. Thanks! Teresa ThinLTO Symbol Linkage and Renaming 1 Introduction 2 Non-Discardable Values 2.2 Linkage Effects 2.2.2 ExternalLinkage 2.2.1 WeakAnyLinkage 2.2.2 WeakODRLinkage 2.2.3 AppendingLinkage 2.2.4 CommonLinkage 3 Linkonce Values 3.1 Linkage Effects 3.2 Importing Strategy 4 Static Values 4.1 Static Variables 4.2 Static Functions 4.3 Static Promotion 4.3.1 Linkage Effects 4.3.2 R...
2011 Aug 31
2
[LLVMdev] How to place call(s) to functions found in other llvm modules ???
Hi, I tried this as well, using the following line to add function declaration to the caller module. Function::Create(FT, Function::ExternalLinkage, "gcd", mod); Where "FT" is the same as before. And the output produced by the PrintModulePass becomes: ; ModuleID = 'GCDMain' declare i32 @gcd(i32, i32) define i32 @main() { EntryBlock: %tmp = call i32 @gcd(i32 30, i32 50) ret i32 %tmp } But it still fails t...
2017 Jun 08
2
[RFC][ThinLTO] llvm-dis ThinLTO summary dump format
...3762489268811518743 > Kind: GlobalVar > Linkage: PrivateLinkage > NotEligibleToImport: true > Live: false > cold: > - GUID: 11668175513417606517 > Kind: Function > Linkage: ExternalLinkage > NotEligibleToImport: true > Live: false > InstCount: 5 > Calls: > - Name: puts > GUID: 8979701042202144121 > Hotness: Unknown > fib: > - GUID: 86672480783...
2009 Jul 18
3
[LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
Hi, I am working on the COFF backend and am wondering where llvm.memcpy gets lowered to memcpy ? It seems to be done by the assembler backends and would have thought it would either be done by a lowering pass or done by the mangler but it does not seem to be either. Many thanks in advance, Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 Jul 18
0
[LLVMdev] Where does llvm.memcpy.i64 and friends get lowered ?
On Sat, Jul 18, 2009 at 2:21 PM, Aaron Gray<aaronngray.lists at googlemail.com> wrote: > I am working on the COFF backend and am wondering where llvm.memcpy gets > lowered to memcpy ? It's done by ISel. See SelectionDAG::getMemcpy. -Eli
2017 Jun 07
2
[RFC][ThinLTO] llvm-dis ThinLTO summary dump format
On Wed, Jun 7, 2017 at 8:58 AM, Charles Saternos <charles.saternos at gmail.com > wrote: > Alright, now it outputs YAML in the following format: > > --- > NamedGlobalValueMap: > X: > - Kind: GlobalVar > Linkage: ExternalLinkage > NotEligibleToImport: false > Live: false > a: > - Kind: Alias > Linkage: WeakAnyLinkage > NotEligibleToImport: false > Live: false > AliaseeGUID: 1881667236089500162 > afun: >...
2011 Aug 31
0
[LLVMdev] How to place call(s) to functions found in other llvm modules ???
On Wed, Aug 31, 2011 at 10:54 AM, Mian M. Hamayun <mian-muhammad.hamayun at imag.fr> wrote: > Hi, > > I tried this as well, using the following line to add function declaration > to the caller module. > > Function::Create(FT, Function::ExternalLinkage, "gcd", mod); > > Where "FT" is the same as before. And the output produced by the > PrintModulePass becomes: > > ; ModuleID = 'GCDMain' > > declare i32 @gcd(i32, i32) > > define i32 @main() { > EntryBlock: >  %tmp = call i32 @gcd(i32 30,...
2013 Jun 28
0
[LLVMdev] Problem with linking modules which use a shared type
...ype* sType = StructType::create( types, "T" ); > > types.clear(); > types.push_back( sType ); > > FunctionType* ft = FunctionType::get( Type::getVoidTy( context ), > types, false ); > > // m1 > Function* f = Function::Create( ft, GlobalValue::ExternalLinkage, "f", > m1 ); > > b = BasicBlock::Create( context, "b", f ); > ReturnInst::Create( context, b ); > > verifyModule(*m1); > > // m2 > Function* fDecl = Function::Create( ft, GlobalValue::ExternalLinkage, > "f", m2 ); >...
2016 Sep 19
3
llvm interpreter does not find function defined by addGlobalMapping
...tDataLayout(pExecutionEngine->getDataLayout()); // declaration of the c function. std::vector<llvm::Type *> noArgTypes; llvm::FunctionType* ft = llvm::FunctionType::get(llvm::Type::getDoubleTy(context),noArgTypes, false); auto pFunction = llvm::Function::Create(ft, llvm::Function::ExternalLinkage, "testFunction",pModule); pExecutionEngine->addGlobalMapping(pFunction,reinterpret_cast<void*>(&testFunction)); // generation of llvm code auto pBlock = llvm::BasicBlock::Create(context, "evaluation"); llvm::IRBuilder<> builder(context); builder.Set...
2019 Feb 22
2
Create the GlobalVariable which have extern in one header file
Hi Good day. I am facing issue with creating a GlobalVariable. I already have an extern for that global in a header file to use it in the following way extern const void* DATA_TABLE[]; And with a LLVM PASS, I am trying to create this array with the same name and with initializer. So, I have following: GlobalVariable *gvar_data = new GlobalVariable( M, blockItems->getType(), true,
2008 Feb 22
2
[LLVMdev] Calling functions
...re out or find in the documentation: I'm doing something like this to call "sin" from std: std::vector<const Type*> params; params.push_back( Type::FloatTy ); FunctionType *FT = FunctionType::get( Type::FloatTy, params, false); Function *F = new Function( FT, Function::ExternalLinkage, "sin", M ); CallInst *CallExternal = new CallInst( F, SomeValue, "external_call", BB ); I can make some calls to functions like glclear() as I'm using opengl: ... Function *F = new Function( FT, Function::ExternalLinkage, "glclear", M ); ... But if I want...
2019 Feb 22
1
Create the GlobalVariable which have extern in one header file
I have changed it to ExternalLinkage. Now, in LLVM IR, it looks like that: @DATA_TABLE = external global [0 x i8*], section "data_section", align 16 #0 @DATA_TABLE.1 = global [10 x i8*] [i8* inttoptr (i64 53415718 to i8*), i8* bitcast (void (%class.Hello*)* @_ZN5Hello5ptofnEv to i8*),...], section "data_section",...